rust/src/test/run-pass/block-arg-in-ternary.rs
Niko Matsakis 43a9d50a74 new tests
2012-01-03 13:13:52 -08:00

7 lines
192 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::negative(e) } ? true : false;
assert foo;
}