Skip to content

Commit

Permalink
sema: improve logging of non-function call errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Mar 5, 2024
1 parent df65090 commit 10afdbd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions std/jule/build/log.jule
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ pub enum LogMsg: str {
GenericsNotAllowed = `generics are not allowed in this scope`,
InitiationCycle = `type declaration causes initiation cycle`,
DeclFoundInsteadExpr = `expecting expression, found type declaration`,
CallingNonFn = `attempting to call a non-function`,

// Suggestions.
ExpectedIdentifier = `write an identifier because identifier expected`,
Expand Down
2 changes: 1 addition & 1 deletion std/jule/sema/eval.jule
Original file line number Diff line number Diff line change
Expand Up @@ -2209,7 +2209,7 @@ impl Eval {
}

if d.kind.fnc() == nil {
self.push_err(fc.token, LogMsg.InvalidSyntax)
self.push_err(fc.token, LogMsg.CallingNonFn)
ret nil
}

Expand Down

0 comments on commit 10afdbd

Please sign in to comment.