diff options
| author | Ginger Bill <bill@gingerbill.org> | 2016-09-22 23:18:29 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2016-09-22 23:18:29 +0100 |
| commit | ee0aa7b9de907e70e00ca3ab891087c2ee86a31b (patch) | |
| tree | 76029a9a80b1ea563c9ccc750f07bc2377359090 /src | |
| parent | 2e506b7e6ebf527f94ac5faaecb54771ed137c48 (diff) | |
Fix assert; exporting rules
Diffstat (limited to 'src')
| -rw-r--r-- | src/checker/expr.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/checker/expr.cpp b/src/checker/expr.cpp index 6bc21157b..c7f424315 100644 --- a/src/checker/expr.cpp +++ b/src/checker/expr.cpp @@ -2077,11 +2077,11 @@ Entity *check_selector(Checker *c, Operand *operand, AstNode *node) { check_entity_decl(c, entity, NULL, NULL); } GB_ASSERT(entity->type != NULL); - b32 is_not_exported = !((e->ImportName.scope == entity->scope) && !is_entity_exported(entity)); + b32 is_not_exported = !is_entity_exported(entity); if (is_not_exported) { auto found = map_get(&e->ImportName.scope->implicit, hash_string(sel_name)); - if (!found) { + if (!found && e->ImportName.scope != entity->scope) { is_not_exported = false; } } @@ -2437,9 +2437,7 @@ b32 check_builtin_procedure(Checker *c, Operand *operand, AstNode *call, i32 id) return false; } - if (operand->mode != Addressing_Constant) { - operand->mode = Addressing_NoValue; - } + operand->mode = Addressing_NoValue; break; case BuiltinProc_panic: |