diff options
| author | gingerBill <bill@gingerbill.org> | 2023-02-08 11:46:33 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-02-08 11:46:33 +0000 |
| commit | 570b1278694e4c7fae7229027ce8984a6a58491b (patch) | |
| tree | 60e5bb277dc44989da940f6692ea0fbfa86961a1 /src/checker.cpp | |
| parent | 6179d4feb1e7e7f1ca2fa418de75e3695318049f (diff) | |
Fix crash when a variable declaration must be an identifier
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index 601c693a0..303a2449e 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -1478,10 +1478,9 @@ gb_internal void add_type_and_value(CheckerContext *ctx, Ast *expr, AddressingMo gb_internal void add_entity_definition(CheckerInfo *i, Ast *identifier, Entity *entity) { GB_ASSERT(identifier != nullptr); - GB_ASSERT(identifier->kind == Ast_Ident); - // if (is_blank_ident(identifier)) { - // return; - // } + if (identifier->kind != Ast_Ident) { + return; + } if (identifier->Ident.entity != nullptr) { // NOTE(bill): Identifier has already been handled return; |