From 62ac70934847673cb7fc56f10d2b552c71f38f97 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Tue, 31 Dec 2024 20:07:20 -0300 Subject: [PATCH] fix --- vlib/v/checker/infix.v | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vlib/v/checker/infix.v b/vlib/v/checker/infix.v index cf170430c9572e..1495fd72493150 100644 --- a/vlib/v/checker/infix.v +++ b/vlib/v/checker/infix.v @@ -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] {