aboutsummaryrefslogtreecommitdiff
path: root/src/checker/expr.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-09-22 23:18:29 +0100
committerGinger Bill <bill@gingerbill.org>2016-09-22 23:18:29 +0100
commitee0aa7b9de907e70e00ca3ab891087c2ee86a31b (patch)
tree76029a9a80b1ea563c9ccc750f07bc2377359090 /src/checker/expr.cpp
parent2e506b7e6ebf527f94ac5faaecb54771ed137c48 (diff)
Fix assert; exporting rules
Diffstat (limited to 'src/checker/expr.cpp')
-rw-r--r--src/checker/expr.cpp8
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: