Error codes

E0113: malformed shape

In a terminal: auk explain E0113 prints this page.

On this page

A shape lists methods that a type must have to fit it. Each method must take self first, and a shape itself can't have type parameters (inside a shape, Self names the fitting type).

Wrong#

auk
shape Area { fn area(): float }

Fixed#

auk
shape Area { fn area(self): float }

Common causes#

  • A method without self: shapes only describe methods called on a value.
  • shape Cmp<T> { ... }: drop the parameter and use Self (fn cmp(self, o: Self): int).

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