rust/src/test/run-pass/pred-not-bool.rs

7 lines
191 B
Rust
Raw Normal View History

2011-05-04 13:32:06 -05:00
// this checks that a pred with a non-bool return
// type is rejected, even if the pred is never used
pure fn bad(a: int) -> int { ret 37; } //! ERROR Non-boolean return type
2011-05-04 13:32:06 -05:00
fn main() { }