diff options
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 88e7be316..560518df9 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -435,7 +435,11 @@ void check_const_decl(CheckerContext *ctx, Entity *e, Ast *type_expr, Ast *init, case Addressing_ProcGroup: GB_ASSERT(operand.proc_group != nullptr); GB_ASSERT(operand.proc_group->kind == Entity_ProcGroup); - override_entity_in_scope(e, operand.proc_group); + // NOTE(bill, 2020-06-10): It is better to just clone the contents than overriding the entity in the scope + // Thank goodness I made entities a tagged union to allow for this implace patching + // override_entity_in_scope(e, operand.proc_group); + e->kind = Entity_ProcGroup; + e->ProcGroup.entities = array_clone(heap_allocator(), operand.proc_group->ProcGroup.entities); return; } |