aboutsummaryrefslogtreecommitdiff
path: root/src/check_stmt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_stmt.cpp')
-rw-r--r--src/check_stmt.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp
index fc6dd757e..7b039e001 100644
--- a/src/check_stmt.cpp
+++ b/src/check_stmt.cpp
@@ -2189,6 +2189,9 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) {
}
entity->parent_proc_decl = ctx->curr_proc_decl;
entities[entity_count++] = entity;
+ if (name->kind == Ast_Ident) {
+ name->Ident.entity = entity;
+ }
}
if (new_name_count == 0) {