mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Merge pull request #5559 from Creativty/variable_dereference_suggestion
Improve dereference missing suggestion message
This commit is contained in:
+2
-1
@@ -2461,7 +2461,8 @@ gb_internal void check_assignment_error_suggestion(CheckerContext *c, Operand *o
|
|||||||
} else if (is_type_pointer(o->type) &&
|
} else if (is_type_pointer(o->type) &&
|
||||||
are_types_identical(type_deref(o->type), type)) {
|
are_types_identical(type_deref(o->type), type)) {
|
||||||
gbString s = expr_to_string(o->expr);
|
gbString s = expr_to_string(o->expr);
|
||||||
error_line("\tSuggestion: Did you mean `%s^`\n", s);
|
if (s[0] == '&') error_line("\tSuggestion: Did you mean `%s`\n", &s[1]);
|
||||||
|
else error_line("\tSuggestion: Did you mean `%s^`\n", s);
|
||||||
gb_string_free(s);
|
gb_string_free(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user