summary refs log tree commit diff
path: root/src/test/run-pass/cycle-collection5.rs
blob: af01d9a35e7e07adcf6ee01c4bf7d9e4a7df38d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
type foo = { mutable z : fn@() };

fn nop() { }
fn nop_foo(_y: @int, _x : @foo) { }

fn o() -> @int { @10 }

fn main() {
    let w = @{ mutable z: bind nop() };
    let x = bind nop_foo(o(), w);
    w.z = x;
}