67cc89f38d
Issue #352 Closes #1720 The old checker would happily accept things like 'alt x { @some(a) { a } }'. It now properly descends into patterns, checks exhaustiveness of booleans, and complains when number/string patterns aren't exhaustive.
11 lines
204 B
Rust
11 lines
204 B
Rust
|
|
|
|
fn altlit(f: int) -> int {
|
|
alt check f {
|
|
10 { #debug("case 10"); ret 20; }
|
|
11 { #debug("case 11"); ret 22; }
|
|
}
|
|
}
|
|
|
|
fn main() { assert (altlit(10) == 20); assert (altlit(11) == 22); }
|