See a missing match case

Finite types let moon prove exactly which cases are missing. This match handles some but omits none, so Check names the uncovered case.

Add none => 0. A catch-all also closes the match, but explicit finite cases preserve the checker's help when the type later grows.

fn number(value: Optional<int>) -> int {
  match value {
    some(inner) => inner,
  }
}

fn main() {}
Output & diagnostics
Try Check. Expected diagnostic:
non-exhaustive match
Ctrl/⌘+Enter checks the current lesson.