Correct existing reliance on auto-box / unbox behavior in tests.

This commit is contained in:
Graydon Hoare 2010-07-01 18:37:30 -07:00
parent 792d96474e
commit f72774db7a
2 changed files with 5 additions and 5 deletions

View File

@ -1,10 +1,10 @@
type box[T] = tup(@T);
fn unbox[T](box[T] b) -> T { ret b._0; }
fn unbox[T](box[T] b) -> T { ret *b._0; }
fn main() {
let int foo = 17;
let box[int] bfoo = tup(foo);
let box[int] bfoo = tup(@foo);
log "see what's in our box";
check (unbox[int](bfoo) == foo);
}

View File

@ -3,7 +3,7 @@ fn ret_int_i() -> int {
}
fn ret_ext_i() -> @int {
ret 10;
ret @10;
}
fn ret_int_tup() -> tup(int,int) {
@ -11,7 +11,7 @@ fn ret_int_tup() -> tup(int,int) {
}
fn ret_ext_tup() -> @tup(int,int) {
ret tup(10, 10);
ret @tup(10, 10);
}
fn ret_ext_mem() -> tup(@int, @int) {
@ -19,7 +19,7 @@ fn ret_ext_mem() -> tup(@int, @int) {
}
fn ret_ext_ext_mem() -> @tup(@int, @int) {
ret tup(@10, @10);
ret @tup(@10, @10);
}
fn main() {