LYR-SEM0173
a binding or parameter holds a 'void'
A local binding is initialized with a void value, or a parameter is declared with type void. Not reported for _, nor in generic code where a type parameter happens to be void.
Explanation
void may be written as a type — it has one value, and ?void, void[] or T = void need it — but a name for that value says nothing.
Call the function for its effect, without the binding; drop a void parameter.
Wrong
fn nothing(): void {
}
fn main(): void {
let x = nothing();
return x;
}
Right
fn nothing(): void {
}
fn main(): void {
nothing();
}