1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ast: rename TypeSymbol.is_public to TypeSymbol.is_pub (#13710)

This commit is contained in:
yuyi
2022-03-11 04:18:57 +08:00
committed by GitHub
parent f3388df577
commit dd06698ee3
7 changed files with 24 additions and 24 deletions

View File

@@ -210,7 +210,7 @@ pub fn (mut c Checker) struct_init(mut node ast.StructInit) ast.Type {
}
}
// allow init structs from generic if they're private except the type is from builtin module
if !type_sym.is_public && type_sym.kind != .placeholder && type_sym.language != .c
if !type_sym.is_pub && type_sym.kind != .placeholder && type_sym.language != .c
&& (type_sym.mod != c.mod && !(node.typ.has_flag(.generic) && type_sym.mod != 'builtin')) {
c.error('type `$type_sym.name` is private', node.pos)
}