Why this fires¶
Zolo's type checker has a Strict strictness mode that requires every function parameter to have an explicit type annotation (self is exempt). Without strict mode, an un-annotated parameter is simply gradual (any); strict mode requires you to say what it is.
fn foo(x) { return x }
// error[TE202]: strict mode: parameter '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.TE202is 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.
Fix it¶
Annotate the parameter:
fn foo(x: int) -> int { return x } // okSee also¶
TE201— the same rule forletbindings.