aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index 7b0743a2d5..f8c3f4c35e 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -3615,6 +3615,9 @@ static VariableTableEntry *add_local_var_shadowable(CodeGen *g, AstNode *source_
// TODO replace _anon with @anon and make sure all tests still pass
buf_init_from_str(&variable_entry->name, "_anon");
}
+ if (context->fn_entry) {
+ context->fn_entry->variable_list.append(variable_entry);
+ }
variable_entry->is_const = is_const;
variable_entry->decl_node = source_node;