projects
/
onyx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51d5aae
)
bugfix with looping scopes
author
Brendan Hansen
<brendan.f.hansen@gmail.com>
Wed, 26 Oct 2022 15:25:21 +0000
(10:25 -0500)
committer
Brendan Hansen
<brendan.f.hansen@gmail.com>
Wed, 26 Oct 2022 15:25:21 +0000
(10:25 -0500)
compiler/src/symres.c
patch
|
blob
|
history
diff --git
a/compiler/src/symres.c
b/compiler/src/symres.c
index 5fdc45f9a51f0c4cb03550523e8ae5ded1960cb0..f37633531e48ba856cb4efed90377aeda31b6c95 100644
(file)
--- a/
compiler/src/symres.c
+++ b/
compiler/src/symres.c
@@
-113,8
+113,9
@@
static SymresStatus symres_struct_type(AstStructType* s_node) {
s_node->flags |= Ast_Flag_Comptime;
if (s_node->scope) {
- // FIX: This is probably wrong for the long term.
- s_node->scope->parent = curr_scope;
+ assert(s_node->entity);
+ assert(s_node->entity->scope);
+ s_node->scope->parent = s_node->entity->scope;
scope_enter(s_node->scope);
}