All codes › Lexical
KEXEL-0019
error UnterminatedCharLiteral
[KEXEL-0019]: Error, unterminated char literal
Single quotes hold exactly one character, a Char. 'hello' has five, so the character literal ends where the second one should be a closing '.
main do
IO.printLine('hello')
end
example.kex:2:16: [KEXEL-0019]: Error, unterminated char literal
|
2 | IO.printLine('hello')
| ^^
Fixing it
Text goes in double quotes:
main do
IO.printLine("hello")
end
Is this diagnostic reported where it should not be, missing where it should be, or saying the wrong thing? Report it on the compiler's issue tracker.