[vala] tests: Add regression test for bug 653391
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] tests: Add regression test for bug 653391
- Date: Sun, 26 Jun 2011 18:01:26 +0000 (UTC)
commit 9471550fcc087064bdd8e91b798b5eb4553792db
Author: Luca Bruno <lucabru src gnome org>
Date: Sun Jun 26 19:59:42 2011 +0200
tests: Add regression test for bug 653391
tests/Makefile.am | 1 +
tests/methods/bug653391.vala | 9 +++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index dec5ed9..1ba9c9c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -41,6 +41,7 @@ TESTS = \
methods/bug642899.vala \
methods/bug646345.vala \
methods/bug648320.vala \
+ methods/bug653391.vala \
control-flow/break.vala \
control-flow/expressions-conditional.vala \
control-flow/for.vala \
diff --git a/tests/methods/bug653391.vala b/tests/methods/bug653391.vala
new file mode 100644
index 0000000..37ce1eb
--- /dev/null
+++ b/tests/methods/bug653391.vala
@@ -0,0 +1,9 @@
+public delegate string Deleg ();
+
+Deleg foo (owned string bar) {
+ return () => { return bar; };
+}
+
+void main () {
+ assert (foo ("foo")() == "foo");
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]