Skip to content

The exhaustiveness check misses single values

Code to reproduce

fn foo(a: uint<3>) -> bool {
  match a {
    0 => true,
    // 1 => true, // i forgor
    2 => true,
    3 => true,
    // 4 => true, // i forgor
    5 => true,
    6 => true,
    // 7 => true, // i forgor
  }
}

playground link

Reported error

No error, even though not all cases were covered by the match