Skip to content

Commit

Permalink
sema: fix and improve error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Jan 12, 2025
1 parent 297a369 commit b84490f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion std/jule/build/log.jule
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ enum LogMsg: str {
OperatorNotForUint: `operator @ is not defined for unsigned integer types`,
IdentNotExist: `undefined identifier: @`,
NotFuncCall: `value is not a function`,
ArgumentOverflow: `@ expected less arguments`,
ArgumentOverflow: `passed more argument than expected to call @`,
FieldOverflow: `expression exceeded field count of type`,
FuncHaveRet: `function @ doesn't have a return type`,
FuncHaveParameters: `function @ doesn't require any parameters`,
RequireRetExpr: `non-void functions should return a value`,
Expand Down
2 changes: 1 addition & 1 deletion std/jule/sema/type2.jule
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ impl structLitChecker {
self.pushErr(expr.Token, build::LogMsg.ArgMustTargetToField)
}
if i >= len(self.s.Fields) {
self.pushErr(expr.Token, build::LogMsg.ArgumentOverflow)
self.pushErr(expr.Token, build::LogMsg.FieldOverflow)
continue
}

Expand Down

0 comments on commit b84490f

Please sign in to comment.