diff options
| author | gingerBill <bill@gingerbill.org> | 2020-04-04 19:45:54 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-04-04 19:45:54 +0100 |
| commit | b54b5aabac1c141411cd626f816ea144f559f5d3 (patch) | |
| tree | 494eb26051a76494edc49fa98e1f475e021bdb0a /src/check_decl.cpp | |
| parent | 3f638f92e2d6973b25e96c2f6ca0cf1522c814cf (diff) | |
Fix crash on aliasing compiler-only packages (e.g. intrinsics) with `_` at the global scope.
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 13f05c5b5..09ad3508c 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -335,6 +335,9 @@ void override_entity_in_scope(Entity *original_entity, Entity *new_entity) { Scope *found_scope = nullptr; Entity *found_entity = nullptr; scope_lookup_parent(original_entity->scope, original_name, &found_scope, &found_entity); + if (found_scope == nullptr) { + return; + } // IMPORTANT TODO(bill) // Date: 2018-09-29 |