diff options
| author | gingerBill <bill@gingerbill.org> | 2020-05-14 00:13:26 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-05-14 00:13:26 +0100 |
| commit | f661d3404952d33d4cb683899ebd05d4b580b2bc (patch) | |
| tree | 79f957be88db8740ebdf214a8107672f88a67052 /src/checker.cpp | |
| parent | af1d4d6e72eeb75b32c40f3d4ca7bf6a78e8a043 (diff) | |
Implement Explicit context creation #639
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 5 |
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; } |