aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-10-26 12:14:04 +0100
committergingerBill <bill@gingerbill.org>2019-10-26 12:14:04 +0100
commit94879ed14997c4d2745ddb669d08b34437ceff75 (patch)
tree6864270ffbfe71a53f3a295f496cf90cebf8121e /src/check_decl.cpp
parent2c75fe2314aa6de6c8f80d519bbb1812ad77b444 (diff)
Fix Compiler assertion when applying `using` to `_` procedure parameter. #451
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 5e8479a7f..ebfc29899 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -1167,11 +1167,10 @@ void check_proc_body(CheckerContext *ctx_, Token token, DeclInfo *decl, Type *ty
for_array(i, scope->elements.entries) {
Entity *f = scope->elements.entries[i].value;
if (f->kind == Entity_Variable) {
- Entity *uvar = alloc_entity_using_variable(e, f->token, f->type);
+ Entity *uvar = alloc_entity_using_variable(e, f->token, f->type, nullptr);
uvar->Variable.is_immutable = is_immutable;
if (is_value) uvar->flags |= EntityFlag_Value;
-
ProcUsingVar puv = {e, uvar};
array_add(&using_entities, puv);