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