Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Dec 31, 2024
1 parent fe95055 commit 62ac709
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vlib/v/checker/infix.v
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,7 @@ fn (mut c Checker) infix_expr(mut node ast.InfixExpr) ast.Type {
}
if left_sym.kind in [.array, .array_fixed] && right_sym.kind in [.array, .array_fixed] {
c.error('only `==` and `!=` are defined on arrays', node.pos)
} else if left_sym.kind == .struct
&& (left_sym.info as ast.Struct).generic_types.len > 0 {
} else if left_sym.info is ast.Struct && left_sym.info.generic_types.len > 0 {
node.promoted_type = ast.bool_type
return ast.bool_type
} else if left_sym.kind == .struct && right_sym.kind == .struct && node.op in [.eq, .lt] {
Expand Down

0 comments on commit 62ac709

Please sign in to comment.