7340824cbc
As it turns out, the correct way to handle this is much simpler than what I did originally. Also add more tests.
13 lines
243 B
Rust
13 lines
243 B
Rust
// xfail-stage0
|
|
|
|
fn add1(int i) -> int { ret i+1; }
|
|
fn main() {
|
|
auto f = @add1;
|
|
auto g = @f;
|
|
auto h = @@@add1;
|
|
assert(f(5) == 6);
|
|
assert(g(8) == 9);
|
|
assert(h(0x1badd00d) == 0x1badd00e);
|
|
assert((@add1)(42) == 43);
|
|
}
|