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

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

fn main() {
    let w = @{ mut z: {||nop()} };
    let x = {||nop_foo(~[], w)};
    w.z = x;
}