Error codes

E0253: ?. on a non-optional value

In a terminal: auk explain E0253 prints this page.

On this page

x?.f is optional chaining: it only applies when x is a T?. This value is never missing, so use a plain ..

Wrong#

auk
fn main() { print(5?.show()) }

Fixed#

auk
fn main() { print(5.show()) }

Common causes#

  • ?. added defensively: Auk tracks optionals in types, so it's never needed on a plain value.
  • A function that used to return T? and no longer does.

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