diff --git a/std/jule/sema/eval.jule b/std/jule/sema/eval.jule index df1ad0720..343a61b9c 100644 --- a/std/jule/sema/eval.jule +++ b/std/jule/sema/eval.jule @@ -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)