1 #![feature(box_syntax)]
13 let a: Clam = Clam{x: box 1, y: box 2};
14 let b: Clam = Clam{x: box 10, y: box 20};
15 let z: isize = a.x + b.y;
16 //~^ ERROR cannot add `std::boxed::Box<isize>` to `std::boxed::Box<isize>`
19 let forty: Fish = Fish{a: box 40};
20 let two: Fish = Fish{a: box 2};
21 let answer: isize = forty.a + two.a;
22 //~^ ERROR cannot add `std::boxed::Box<isize>` to `std::boxed::Box<isize>`
23 println!("{}", answer);
24 assert_eq!(answer, 42);