2010-06-23 23:03:09 -05:00
|
|
|
type box[T] = tup(@T);
|
|
|
|
|
2010-07-01 20:37:30 -05:00
|
|
|
fn unbox[T](box[T] b) -> T { ret *b._0; }
|
2010-06-23 23:03:09 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let int foo = 17;
|
2010-07-01 20:37:30 -05:00
|
|
|
let box[int] bfoo = tup(@foo);
|
2010-06-23 23:03:09 -05:00
|
|
|
log "see what's in our box";
|
|
|
|
check (unbox[int](bfoo) == foo);
|
|
|
|
}
|