Minor changes to error message for missing initializer in constant declaration
This commit is contained in:
parent
d905f319b2
commit
f80ac42101
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue