Minor changes to error message for missing initializer in constant declaration

This commit is contained in:
Nocturn9x 2021-10-29 10:51:27 +02:00
parent d905f319b2
commit f80ac42101
1 changed files with 1 additions and 1 deletions

View File

@ -729,7 +729,7 @@ proc varDecl(self: Parser, isStatic: bool = true, isPrivate: bool = true): ASTNo
self.error("the initializer for constant declarations must be a primitive and constant type")
else:
if varKind.kind == Const:
self.error("constant declaration requires a value")
self.error("constant declaration requires an explicit initializer")
value = newNilExpr()
self.expect(Semicolon, &"expecting semicolon after {keyword} declaration")
case varKind.kind: