public class Foo : Object {
    public delegate void DelegateType ();

    async void f3 (DelegateType d) {
        d ();
    }

    async void f2 (DelegateType d) {
        d ();
        yield f3 (d);
        d ();      // <----- x local to f1 has gone
        stdout.printf ("bye\n");
    }

    void f1 () {
        var x = "hello";
        f2 (() => {stdout.printf ("%s\n", x);});
    }

    public static int main(string[] args) {
        var foo = new Foo ();
        foo.f1 ();
        new MainLoop (null, false).run ();
        return 0;
    }
}

