aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index 992aeb9b3..2bf79134d 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -231,6 +231,11 @@ Scope *create_scope(Scope *parent, gbAllocator allocator, isize init_elements_ca
if (parent != nullptr && parent != builtin_pkg->scope) {
DLIST_APPEND(parent->first_child, parent->last_child, s);
}
+
+ if (parent != nullptr && parent->flags & ScopeFlag_ContextDefined) {
+ s->flags |= ScopeFlag_ContextDefined;
+ }
+
return s;
}