Lyricdev
GitHub

LYR-RT0004

a null value unwrapped

panic ยท spec 03-types

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);
}