[go: up one dir, main page]

kex oops docs ↗ kex.run ↗

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

Edit this explanation

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.