aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-04-13 18:57:47 +0100
committergingerBill <bill@gingerbill.org>2021-04-13 18:57:47 +0100
commit12296a0dcc440e0ac79059dd33aa44caebf7560a (patch)
tree5071d4298b5fb4e56340e14bd85ce8b1e31ea0ce
parent2b36069924c9fa21111fe8a8b5471e25847c52cf (diff)
Allow `intrinsics` entities to be exported from other packages if wanted
-rw-r--r--src/check_expr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 3c4addb4e..3b7a975d1 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -3515,7 +3515,7 @@ Entity *check_selector(CheckerContext *c, Operand *operand, Ast *node, Type *typ
if (entity->kind == Entity_Builtin) {
// NOTE(bill): Builtin's are in the universal scope which is part of every scopes hierarchy
// This means that we should just ignore the found result through it
- allow_builtin = entity->scope == import_scope;
+ allow_builtin = entity->scope == import_scope || entity->scope != builtin_pkg->scope;
} else if ((entity->scope->flags&ScopeFlag_Global) == ScopeFlag_Global && (import_scope->flags&ScopeFlag_Global) == 0) {
is_declared = false;
}