rust/src/test/run-pass/cycle-collection5.rs

13 lines
195 B
Rust
Raw Normal View History

2011-10-21 19:21:59 -05:00
type foo = { mutable z : fn@() };
fn nop() { }
fn nop_foo(_y: o, _x : @foo) { }
obj o() {
}
fn main() {
let w = @{ mutable z: bind nop() };
let x = bind nop_foo(o(), w);
w.z = x;
}