Skip to content

Commit

Permalink
fix message
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Jan 21, 2025
1 parent eb1f52a commit 139f488
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vlib/v/checker/checker.v
Original file line number Diff line number Diff line change
Expand Up @@ -5293,8 +5293,8 @@ fn (mut c Checker) ensure_type_exists(typ ast.Type, pos token.Pos) bool {
return false
}
sym := c.table.sym(typ)
if !c.is_builtin_mod && sym.kind == .struct && !sym.is_pub && sym.mod != c.mod {
c.error('struct `${sym.name}` was declared as private to module `${sym.mod}`, so it can not be used inside module `${c.mod}`',
if !c.is_builtin_mod && sym.kind in [.struct, .alias] && !sym.is_pub && sym.mod != c.mod {
c.error('${sym.kind} `${sym.name}` was declared as private to module `${sym.mod}`, so it can not be used inside module `${c.mod}`',
pos)
return false
}
Expand Down

0 comments on commit 139f488

Please sign in to comment.