Skip to content

Commit

Permalink
sema: fix caughing not invoked built-in functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Jun 22, 2024
1 parent 641a4d1 commit 83f0400
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions std/jule/build/log.jule
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ enum LogMsg: str {
TypeCaseHasNotValidExpr: `type-match must be have <any>, <type enum>, <trait> or <generic> typed expression`,
IllegalImplOutOfPackage: `illegal implementation via definition from out of package`,
MethodNotInvoked: `methods should be invoked`,
BuiltinNotInvoked: `built-in functions should be invoked`,
DuplicatedUseSelection: `duplicated selection: @ is already selected`,
IdentIsNotAccessible: `inaccessible identifier: @ is private`,
InvalidStmtForNext: `invalid statement for while-next`,
Expand Down
1 change: 1 addition & 0 deletions std/jule/sema/eval.jule
Original file line number Diff line number Diff line change
Expand Up @@ -2952,6 +2952,7 @@ impl Eval {
| d.Kind.Fn() != nil:
let mut f = d.Kind.Fn()
if f.IsBuiltin() {
self.s.pushErr(expr.Token, LogMsg.BuiltinNotInvoked)
break
}
if len(f.Generics) != len(f.Decl.Generics) {
Expand Down

0 comments on commit 83f0400

Please sign in to comment.