mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-11 02:19:30 +00:00
Merge pull request #6928 from bergperri/fix-field-names-report-error
Fix compiler segmentation fault when field names start with '.'
This commit is contained in:
@@ -10226,7 +10226,7 @@ gb_internal void check_compound_literal_field_values(CheckerContext *c, Slice<As
|
||||
Ast *ident = fv->field;
|
||||
if (ident->kind == Ast_ImplicitSelectorExpr) {
|
||||
gbString expr_str = expr_to_string(ident);
|
||||
error(ident, "Field names do not start with a '.', remove the '.' in %.*s", expr_str, LIT(assignment_str));
|
||||
error(ident, "Field names do not start with a '.', remove the '.' from '%s' in %.*s", expr_str, LIT(assignment_str));
|
||||
gb_string_free(expr_str);
|
||||
|
||||
ident = ident->ImplicitSelectorExpr.selector;
|
||||
|
||||
Reference in New Issue
Block a user