Error codes

E0202: no overload takes this first argument type

In a terminal: auk explain E0202 prints this page.

On this page

The function is overloaded by its first parameter's type, and none of the overloads takes the type given here. The note lists the overloads that exist.

Wrong#

auk
fn describe(n: int): str = "int"
fn describe(s: str): str = "str"
fn main() { print(describe(1.5)) }

Fixed#

auk
fn describe(n: int): str = "int"
fn describe(s: str): str = "str"
fn main() { print(describe(int(1.5))) }

Common causes#

  • A missing conversion of the first argument.
  • Arguments passed in the wrong order.
  • A new type that needs its own overload: add fn describe(x: float): str.

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