Browse Source

Clear up Mismatched BE types error message

Cedric Hutchings 3 years ago
parent
commit
3d9d85121d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/check_expr.cpp

+ 1 - 1
src/check_expr.cpp

@@ -3211,7 +3211,7 @@ void check_binary_expr(CheckerContext *c, Operand *x, Ast *node, Type *type_hint
 		    y->type != t_invalid) {
 		    y->type != t_invalid) {
 			gbString xt = type_to_string(x->type);
 			gbString xt = type_to_string(x->type);
 			gbString yt = type_to_string(y->type);
 			gbString yt = type_to_string(y->type);
-			gbString expr_str = expr_to_string(x->expr);
+			gbString expr_str = expr_to_string(node);
 			error(op, "Mismatched types in binary expression '%s' : '%s' vs '%s'", expr_str, xt, yt);
 			error(op, "Mismatched types in binary expression '%s' : '%s' vs '%s'", expr_str, xt, yt);
 			gb_string_free(expr_str);
 			gb_string_free(expr_str);
 			gb_string_free(yt);
 			gb_string_free(yt);