3 #![feature(box_syntax)]
12 fn test(x: bool, foo: Box<Triple>) -> isize {
14 let mut y: Box<Triple>;
15 if x { y = bar; } else { y = box Triple {x: 4, y: 5, z: 6}; }
20 let x: Box<_> = box Triple{x: 1, y: 2, z: 3};
21 for _ in 0_usize..10000_usize {
22 assert_eq!(test(true, x.clone()), 2);
24 assert_eq!(test(false, x), 5);