Why this fires¶
Zolo's type checker has a Strict strictness mode that requires every let binding to resolve to a concrete type — either through an explicit annotation, or by inferring something more specific than any/unknown from its value. A binding whose value's type can't be pinned down (e.g. it comes from a function whose return type is any) is rejected instead of silently degrading to any.
fn get_value() -> any { return 42 }
let x = get_value()
// error[TE201]: strict mode: variable 'x' must have a type annotationCurrent status:
zolo.toml's[compiler] type_check = "strict"field documents the intent, but as of this writing no CLI command (zolo check,zolo build,zolo run) or the LSP actually switches the type checker intoStrictmode — they all run inRelaxed/Standardmode regardless of that setting.TE201is reachable today only through the compiler's own Rust API (zolo_compiler::compiler::type_check_with_mode(src, StrictnessMode::Strict)/compile_to_lua_with_mode), which is how the compiler's own test suite exercises it. If you hit this code from tooling, you are using that API directly (e.g. embedding the compiler, or a custom build script).
Fix it¶
1. Add an explicit annotation¶
let x: int = get_value() // ok — annotation pins the type down2. Give the source function a concrete return type¶
fn get_value() -> int { return 42 }
let x = get_value() // ok — inferred as intSee also¶
TE202— the same rule for function parameters.