aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/checker.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index b62ef7c4c..7fb4fdb29 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -3477,11 +3477,11 @@ void check_collect_value_decl(CheckerContext *c, Ast *decl) {
if (entity_visibility_kind == EntityVisiblity_Public &&
(c->scope->flags&ScopeFlag_File) &&
c->scope->file) {
- if (c->scope->file->flags & AstFile_IsPrivatePkg) {
- entity_visibility_kind = EntityVisiblity_PrivateToPackage;
- } else if (c->scope->file->flags & AstFile_IsPrivateFile) {
+ if (c->scope->file->flags & AstFile_IsPrivateFile) {
entity_visibility_kind = EntityVisiblity_PrivateToFile;
- }
+ } else if (c->scope->file->flags & AstFile_IsPrivatePkg) {
+ entity_visibility_kind = EntityVisiblity_PrivateToPackage;
+ }
}
if (entity_visibility_kind != EntityVisiblity_Public && !(c->scope->flags&ScopeFlag_File)) {