2012-03-26 18:35:18 -07:00
|
|
|
type foo = { mut z : fn@() };
|
2011-10-21 17:21:59 -07:00
|
|
|
|
|
|
|
fn nop() { }
|
2012-01-13 11:48:55 +01:00
|
|
|
fn nop_foo(_y: @int, _x : @foo) { }
|
2011-10-21 17:21:59 -07:00
|
|
|
|
2012-01-13 11:48:55 +01:00
|
|
|
fn o() -> @int { @10 }
|
2011-10-21 17:21:59 -07:00
|
|
|
|
|
|
|
fn main() {
|
2012-06-19 19:34:01 -07:00
|
|
|
let w = @{ mut z: {||nop()} };
|
|
|
|
let x = {||nop_foo(o(), w)};
|
2011-10-21 17:21:59 -07:00
|
|
|
w.z = x;
|
|
|
|
}
|