Error codes

E0203: called value is not a function

In a terminal: auk explain E0203 prints this page.

On this page

Something that isn't a function or closure was called with (...). In Auk only functions and closures (types like (int) => int) can be called.

Wrong#

auk
fn main() {
  let n = 5
  print(n(2))
}

Fixed#

auk
fn main() {
  let n = 5
  print(n * 2)
}

Common causes#

  • Implicit multiplication from math notation: n(2) instead of n * 2.
  • A variable that shadows a function of the same name.
  • Calling a field that holds data, not a closure.

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