diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-11-01 15:49:10 +0100 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2022-11-01 15:49:10 +0100 |
| commit | 6cc07dc24e4eb9800b1086580d271970b45f77cb (patch) | |
| tree | 61a2667221360c48e74aed93e1a51deef7b13622 /src | |
| parent | 01cdd22a01b4133c791ed1d04ebdf22a044e35b0 (diff) | |
| parent | 35331e6973280da2a0f9971a33842fb45d311aac (diff) | |
Merge branch 'master' of github.com:odin-lang/Odin
Diffstat (limited to 'src')
| -rw-r--r-- | src/checker.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index 9b2f72205..dd81e2a48 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -1673,7 +1673,11 @@ bool could_entity_be_lazy(Entity *e, DeclInfo *d) { } void add_entity_and_decl_info(CheckerContext *c, Ast *identifier, Entity *e, DeclInfo *d, bool is_exported) { - GB_ASSERT(identifier != nullptr); + if (identifier == nullptr) { + // NOTE(bill): Should only happen on errors + error(e->token, "Invalid variable declaration"); + return; + } if (identifier->kind != Ast_Ident) { // NOTE(bill): This is a safety check gbString s = expr_to_string(identifier); |