aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/box-unbox.rs
blob: d0ad615b2e61cffa31e9a89d005a5c66bb8d373d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
type box[T] = tup(@T);

fn unbox[T](&box[T] b) -> T { ret *b._0; }

fn main() {
  let int foo = 17;
  let box[int] bfoo = tup(@foo);
  log "see what's in our box";
  check (unbox[int](bfoo) == foo);
}