From 94879ed14997c4d2745ddb669d08b34437ceff75 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 26 Oct 2019 12:14:04 +0100 Subject: Fix Compiler assertion when applying `using` to `_` procedure parameter. #451 --- src/check_decl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/check_decl.cpp') 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); -- cgit v1.2.3