Docs menu

E109: A type was expected here

What compiler error E109 means, and how to fix it.

Turf was waiting for a type – int, string, bool, double, char, a struct’s name, List<int>, … – and found something that isn’t one.

Example
fn add(a: int, b:): int { ... }        // parameter `b` has no typefn get(): { ... }                       // the return type is missingmut values: List<> = ...;               // nothing between the < >

Write the type:

Example
fn add(a: int, b: int): int { ... }

A function that returns nothing says so with void: fn log(msg: string): void { ... }. A type name is case sensitive – Int is not int – and a struct or enum you declared works as a type too.

sizeof takes a type too, not a value: sizeof(a) with a variable a is this error. Write the variable’s type, sizeof(int).

Run turf --explain E109 in a terminal to read this again.

Last updated: Oct 15, 2026Edit this page on GitHub

Esc

Type to search.