mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: check if imported struct is public (#6425)
This commit is contained in:
parent
4121ba9ea9
commit
4b0e7fc979
@ -2363,7 +2363,7 @@ fn (mut c Checker) import_stmt(imp ast.Import) {
|
||||
}
|
||||
if sym.kind == .type_ {
|
||||
if type_sym := c.table.find_type(name) {
|
||||
if type_sym.kind == .placeholder {
|
||||
if type_sym.kind == .placeholder || !type_sym.is_public {
|
||||
c.error('module `$imp.mod` has no public type `$sym.name\{}`', sym.pos)
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user