LYR-RT0004
a null value unwrapped
x! met a ?T that holds nothing. Use ?., ?? or a match where the value can be absent.
Program
fn must(v: ?int): int {
return v!;
}
fn main(): void {
assert(must(null) == 0);
}
a null value unwrapped
x! met a ?T that holds nothing. Use ?., ?? or a match where the value can be absent.
fn must(v: ?int): int {
return v!;
}
fn main(): void {
assert(must(null) == 0);
}