Lyricdev
GitHub

LYR-RES0011

a declaration that takes a builtin type's name

error · spec 04-modules

A top-level declaration is named like a builtin type: struct int, fn string().

Explanation

The builtin types' names — int, string, bool, char and the rest — mean the language's own types in every module. A declaration of the same name would make the name mean two things.

Choose another name.

Wrong

struct int {
    x: int
}

fn main(): void {
}
struct Count {
    x: int
}

fn main(): void {
}