Skip to content

Commit

Permalink
sema: fix private methods of structures are allowed to access out of …
Browse files Browse the repository at this point in the history
…package
  • Loading branch information
mertcandav committed Jan 30, 2024
1 parent 7e2e648 commit a84fe94
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions std/jule/sema/eval.jule
Original file line number Diff line number Diff line change
Expand Up @@ -2351,6 +2351,10 @@ impl Eval {
self.push_err(si.ident, LogMsg.ObjHaveNotIdent, s.decl.ident, si.ident.kind)
ret nil
}
if !self.s.is_accessible_define(m.public, m.token) {
self.push_err(si.ident, LogMsg.IdentIsNotAccessible, m.ident)
self.push_suggestion(LogMsg.MakePubToAccess)
}

if m.params[0].is_ref() && !ref {
self.push_err(si.ident, LogMsg.RefMethodUsedWithNotRefInstance)
Expand Down

0 comments on commit a84fe94

Please sign in to comment.