diff options
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 |