rust/src/test/compile-fail/forgot-ret.rs
2011-06-14 12:27:23 -07:00

17 lines
203 B
Rust

// -*- rust -*-
// error-pattern: not all control paths return
fn god_exists(int a) -> bool {
be god_exists(a);
}
fn f(int a) -> int {
if (god_exists(a)) {
ret 5;
}
}
fn main() {
f(12);
}