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, 2 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index 5ffce5bdb8..3064ad359d 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -3757,6 +3757,7 @@ static VariableTableEntry *add_local_var(CodeGen *g, AstNode *source_node, Impor
VariableTableEntry *variable_entry = allocate<VariableTableEntry>(1);
variable_entry->type = type_entry;
variable_entry->block_context = context;
+ variable_entry->import = import;
if (name) {
buf_init_from_buf(&variable_entry->name, name);
@@ -6025,7 +6026,7 @@ static TypeTableEntry *analyze_switch_expr(CodeGen *g, ImportTableEntry *import,
int *field_use_counts = nullptr;
- HashMap<int, AstNode *, int_hash, int_eq> err_use_nodes;
+ HashMap<int, AstNode *, int_hash, int_eq> err_use_nodes = {};
if (expr_type->id == TypeTableEntryIdEnum) {
field_use_counts = allocate<int>(expr_type->data.enumeration.field_count);
} else if (expr_type->id == TypeTableEntryIdErrorUnion) {