]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Add test for bug 595538
authorJürg Billeter <j@bitron.ch>
Sat, 26 Sep 2009 14:39:00 +0000 (16:39 +0200)
committerJürg Billeter <j@bitron.ch>
Sat, 26 Sep 2009 14:39:00 +0000 (16:39 +0200)
tests/Makefile.am
tests/methods/bug595538.vala [new file with mode: 0644]

index 61eb60d6b5e4183c6a2e3d0bd120df433d11b1fa..0e995df87cc838b3bd603e59969d0a463ed5feac 100644 (file)
@@ -23,6 +23,7 @@ TESTS = \
        namespaces.vala \
        methods/lambda.vala \
        methods/closures.vala \
+       methods/bug595538.vala \
        control-flow/break.vala \
        control-flow/expressions-conditional.vala \
        control-flow/for.vala \
diff --git a/tests/methods/bug595538.vala b/tests/methods/bug595538.vala
new file mode 100644 (file)
index 0000000..18a183b
--- /dev/null
@@ -0,0 +1,15 @@
+delegate void Foo ();
+
+void do_foo (Foo foo) {
+       foo ();
+}
+
+void main () {
+       int i = 42;
+       do_foo (() => {
+               do_foo (() => {
+                       int j = i;
+               });
+       });
+}
+