codegen: Fix array size variable on assignment
[vala-lang.git] / tests / asynchronous / closures.vala
blob791010c924882df7361761460c79c2822dcc52a2
1 delegate void Func ();
3 MainLoop main_loop;
5 async void foo (string baz) {
6 string bar = "hello";
7 Func foobar = () => {
8 bar = baz;
9 };
10 foobar ();
11 assert (bar == "world");
13 Idle.add (foo.callback);
14 yield;
16 main_loop.quit ();
19 void main () {
20 foo.begin ("world");
22 main_loop = new MainLoop (null, false);
23 main_loop.run ();