From f661d3404952d33d4cb683899ebd05d4b580b2bc Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 14 May 2020 00:13:26 +0100 Subject: Implement Explicit context creation #639 --- src/checker.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/checker.cpp') 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; } -- cgit v1.2.3