diff options
| author | gingerBill <bill@gingerbill.org> | 2019-10-26 12:14:04 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-10-26 12:14:04 +0100 |
| commit | 94879ed14997c4d2745ddb669d08b34437ceff75 (patch) | |
| tree | 6864270ffbfe71a53f3a295f496cf90cebf8121e /src/entity.cpp | |
| parent | 2c75fe2314aa6de6c8f80d519bbb1812ad77b444 (diff) | |
Fix Compiler assertion when applying `using` to `_` procedure parameter. #451
Diffstat (limited to 'src/entity.cpp')
| -rw-r--r-- | src/entity.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/entity.cpp b/src/entity.cpp index 78726171d..bbea68e8b 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -221,12 +221,13 @@ Entity *alloc_entity_variable(Scope *scope, Token token, Type *type, bool is_imm return entity; } -Entity *alloc_entity_using_variable(Entity *parent, Token token, Type *type) { +Entity *alloc_entity_using_variable(Entity *parent, Token token, Type *type, Ast *using_expr) { GB_ASSERT(parent != nullptr); token.pos = parent->token.pos; Entity *entity = alloc_entity(Entity_Variable, parent->scope, token, type); entity->using_parent = parent; entity->parent_proc_decl = parent->parent_proc_decl; + entity->using_expr = using_expr; entity->flags |= EntityFlag_Using; entity->flags |= EntityFlag_Used; entity->state = EntityState_Resolved; |