diff options
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index 4712876de..9abd8c499 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -2591,7 +2591,7 @@ void check_collect_value_decl(CheckerContext *c, Ast *decl) { pl->type->ProcType.calling_convention = cc; } d->proc_lit = init; - d->type_expr = pl->type; + d->type_expr = vd->type; } else if (init->kind == Ast_ProcGroup) { ast_node(pg, ProcGroup, init); e = alloc_entity_proc_group(d->scope, token, nullptr); @@ -2599,6 +2599,7 @@ void check_collect_value_decl(CheckerContext *c, Ast *decl) { error(name, "Procedure groups are not allowed within a foreign block"); } d->init_expr = init; + d->type_expr = vd->type; } else { e = alloc_entity_constant(d->scope, token, nullptr, empty_exact_value); d->type_expr = vd->type; |