Error codes

E0007: malformed char literal

In a terminal: auk explain E0007 prints this page.

On this page

A char literal (single quotes) must hold exactly one character, like 'a' or '\n'. It is empty, unterminated, or holds several characters. Strings use double quotes.

Wrong#

auk
fn greeting(): str = 'hello'

Fixed#

auk
fn greeting(): str = "hello"

Common causes#

  • Single quotes used for a string, as in Python or JavaScript.
  • An empty ''.
  • A forgotten closing '.

Stuck on a word? Try the glossary. Got a compiler error? Look up its code. Improve this page