rust/src/test/run-pass/block-arg-in-ternary.rs
2012-01-05 16:25:51 +01:00

7 lines
195 B
Rust

// Allow block arguments with ternary... why not, no chance of ambig.
fn main() {
let v = [-1f, 1f];
let foo = vec::any(v) { |e| float::is_negative(e) } ? true : false;
assert foo;
}