A type was expected (after : in a parameter, field or let, or as a return type) and this
token can't start one. Types look like int, [str], {str: int}, (int, str), T?, T!,
T!E or Set<int>.
Wrong#
fn f(n: 1): int = nFixed#
fn f(n: int): int = nCommon causes#
- A value written where its type belongs:
x: 1instead ofx: int. - A missing type after
:. - Syntax from another language:
int[](write[int]),Option<T>(writeT?).