From: Florian Brosch Date: Wed, 8 Aug 2012 18:54:27 +0000 (+0200) Subject: Test symbol resolution in closures X-Git-Tag: 0.17.5~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c504c9025237dac72c29a6ce5d2ee92ecc2d337;p=thirdparty%2Fvala.git Test symbol resolution in closures --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 6de7a7bb3..41cea9ead 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -35,6 +35,7 @@ TESTS = \ namespaces.vala \ methods/lambda.vala \ methods/closures.vala \ + methods/symbolresolution.vala \ methods/bug595538.vala \ methods/bug596726.vala \ methods/bug597426.vala \ diff --git a/tests/methods/symbolresolution.vala b/tests/methods/symbolresolution.vala new file mode 100644 index 000000000..90fe97c30 --- /dev/null +++ b/tests/methods/symbolresolution.vala @@ -0,0 +1,17 @@ +public class Class { + public delegate void Foo (); + + public void foo () { + assert_not_reached (); + } + + public void test (Foo foo) { + Foo func = () => { foo (); }; + func (); + } +} + +void main () { + var cl = new Class (); + cl.test (() => { }); +}