LYR-LEX0008
a character literal that holds no character or several
Between the quotes of a character literal stand no characters ('') or more than one ('ab'). An escape counts as one.
Explanation
A character literal is one character, a Unicode scalar value: 'a', '\n', '๐'. Text of any other length is a string.
Write one character, or write the text as a string in double quotes.
Wrong
fn main(): void {
let c = 'ab';
let _ = c;
}
Right
fn main(): void {
let c = 'a';
let _ = c;
}