2011-06-15 13:19:50 -05:00
|
|
|
|
|
|
|
|
2012-01-05 08:35:37 -06:00
|
|
|
fn box<T: copy>(x: {x: T, y: T, z: T}) -> @{x: T, y: T, z: T} { ret @x; }
|
2011-03-07 16:05:16 -06:00
|
|
|
|
|
|
|
fn main() {
|
2011-08-13 02:10:18 -05:00
|
|
|
let x: @{x: int, y: int, z: int} = box::<int>({x: 1, y: 2, z: 3});
|
2011-07-26 07:49:40 -05:00
|
|
|
assert (x.y == 2);
|
2011-08-12 08:37:25 -05:00
|
|
|
}
|