Docs menu

E106: A colon is missing

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

In Turf a colon : joins a name to its type, and a function’s parameter list to its return type. Turf expected one and found something else.

The commonest case is forgetting the colon before a function’s return type:

Example
fn add(a: int, b: int) int {     // needs `:` before `int`    return a + b;}fn add(a: int, b: int): int {    return a + b;}

The same shape shows up for a parameter or a struct field, which is name: type:

Example
fn greet(name string) { }        // should be `name: string`struct User { age int }          // should be `age: int`

And in compare, the matches and otherwise arms need a colon before their body:

Example
otherwise: { ... }

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

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

Esc

Type to search.