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.
13 lines
196 B
Rust
13 lines
196 B
Rust
|
|
|
|
|
|
// -*- rust -*-
|
|
|
|
// Tests for alt as expressions resulting in boxed types
|
|
fn test_box() {
|
|
let res = alt check true { true { ~100 } };
|
|
assert (*res == 100);
|
|
}
|
|
|
|
fn main() { test_box(); }
|