diff --git a/vlib/v/checker/infix.v b/vlib/v/checker/infix.v index 1b9adfd095..438030f986 100644 --- a/vlib/v/checker/infix.v +++ b/vlib/v/checker/infix.v @@ -174,8 +174,8 @@ pub fn (mut c Checker) infix_expr(mut node ast.InfixExpr) ast.Type { } else { return_type = left_type } - } else if left_final.has_method(node.op.str()) { - if method := left_final.find_method(node.op.str()) { + } else if left_final_sym.has_method(node.op.str()) { + if method := left_final_sym.find_method(node.op.str()) { return_type = method.return_type } else { return_type = left_type @@ -198,8 +198,8 @@ pub fn (mut c Checker) infix_expr(mut node ast.InfixExpr) ast.Type { } else { return_type = right_type } - } else if right_final.has_method(node.op.str()) { - if method := right_final.find_method(node.op.str()) { + } else if right_final_sym.has_method(node.op.str()) { + if method := right_final_sym.find_method(node.op.str()) { return_type = method.return_type } else { return_type = right_type