PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/src/test/run-pass/box-inside-if2.rs

http://github.com/jruderman/rust
Rust | 15 lines | 7 code | 7 blank | 1 comment | 2 complexity | 759b2f24a99d467402d7d10012bc35f6 MD5 | raw file
 1
 2
 3// -*- rust -*-
 4
 5fn some_box(x: int) -> @int { return @x; }
 6
 7fn is_odd(n: int) -> bool { return true; }
 8
 9fn length_is_even(vs: @int) -> bool { return true; }
10
11fn foo(acc: int, n: int) {
12    if is_odd(n) || length_is_even(some_box(1)) { error!{"bloop"}; }
13}
14
15fn main() { foo(67, 5); }