mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Correct //+private for odin doc
This commit is contained in:
@@ -3446,6 +3446,13 @@ void check_collect_value_decl(CheckerContext *c, Ast *decl) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (entity_visibility_kind == EntityVisiblity_Public &&
|
||||||
|
(c->scope->flags&ScopeFlag_File) &&
|
||||||
|
c->scope->file &&
|
||||||
|
(c->scope->file->flags & AstFile_IsPrivate)) {
|
||||||
|
entity_visibility_kind = EntityVisiblity_PrivateToPackage;
|
||||||
|
}
|
||||||
|
|
||||||
if (entity_visibility_kind != EntityVisiblity_Public && !(c->scope->flags&ScopeFlag_File)) {
|
if (entity_visibility_kind != EntityVisiblity_Public && !(c->scope->flags&ScopeFlag_File)) {
|
||||||
error(decl, "Attribute 'private' is not allowed on a non file scope entity");
|
error(decl, "Attribute 'private' is not allowed on a non file scope entity");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user