mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: make type is private
warning an errror
This commit is contained in:
parent
b1511ce995
commit
db5036686b
@ -256,7 +256,7 @@ pub fn (mut c Checker) struct_init(mut struct_init ast.StructInit) table.Type {
|
||||
}
|
||||
type_sym := c.table.get_type_symbol(struct_init.typ)
|
||||
if !type_sym.is_public && type_sym.kind != .placeholder && type_sym.mod != c.mod {
|
||||
c.warn('type `$type_sym.name` is private', struct_init.pos)
|
||||
c.error('type `$type_sym.name` is private', struct_init.pos)
|
||||
}
|
||||
// println('check struct $typ_sym.name')
|
||||
match type_sym.kind {
|
||||
|
Loading…
Reference in New Issue
Block a user