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.
9 lines
217 B
Rust
9 lines
217 B
Rust
// error-pattern: not all control paths return a value
|
|
|
|
fn f() -> int {
|
|
// Make sure typestate doesn't interpret this alt expression
|
|
// as the function result
|
|
alt check true { true { } };
|
|
}
|
|
|
|
fn main() { }
|