LYR-SEM0199
a 'var' that is written and never read
Every use of a var is the target of an assignment: what it stores is never read.
Explanation
A value stored and never read is work for nothing — often a forgotten use, or an assignment to the wrong name.
Read what the assignments store, or take them out with the binding. A store that a later one overwrites before a read is not looked for.
Wrong
fn main(): void {
var last = 0;
last = 2;
}
Right
import std.io { println };
fn main(): void {
var last = 0;
last = 2;
println(last);
}