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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user