Correct existing reliance on auto-box / unbox behavior in tests.
This commit is contained in:
parent
792d96474e
commit
f72774db7a
@ -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);
|
||||
}
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user