aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2025-03-07 10:33:41 +0000
committergingerBill <bill@gingerbill.org>2025-03-07 10:33:41 +0000
commit168a41ba2c14fc89938ef3af84bb298099d5e4f5 (patch)
tree3eb75bf3afb777bdc5185d580e884e8fd215dd1c /src
parentf3210eccaf6d5a9ccb46040d74aabf4f4b85cd86 (diff)
Fix #4803
Diffstat (limited to 'src')
-rw-r--r--src/llvm_backend_stmt.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/llvm_backend_stmt.cpp b/src/llvm_backend_stmt.cpp
index 4fcb136b0..1f783b1be 100644
--- a/src/llvm_backend_stmt.cpp
+++ b/src/llvm_backend_stmt.cpp
@@ -1938,7 +1938,11 @@ gb_internal void lb_build_type_switch_stmt(lbProcedure *p, AstTypeSwitchStmt *ss
lb_add_entity(p->module, case_entity, ptr);
lb_add_debug_local_variable(p, ptr.value, case_entity->type, case_entity->token);
} else {
- lb_store_type_case_implicit(p, clause, parent_value, false);
+ if (by_reference) {
+ lb_store_type_case_implicit(p, clause, parent_ptr, false);
+ } else {
+ lb_store_type_case_implicit(p, clause, parent_value, false);
+ }
}
lb_type_case_body(p, ss->label, clause, body, done);