summaryrefslogtreecommitdiff
path: root/tests/parser
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2018-09-22 14:44:40 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2018-09-22 16:28:33 +0200
commit898e45a6ff6129fc5c674af48118042dd64123ff (patch)
tree9d87af16507e5710862eeeca57696ca922341e36 /tests/parser
parentce7c31eaff13fcd8c2da7a0d52deb8f97043df24 (diff)
downloadvala-898e45a6ff6129fc5c674af48118042dd64123ff.tar.gz
vala: Enforce "return yield ..." syntax to be expected
"yield return ..." wasn't handled correctly and resulted in broken c-code. Fixes https://gitlab.gnome.org/GNOME/vala/issues/675
Diffstat (limited to 'tests/parser')
-rw-r--r--tests/parser/yield-return.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/parser/yield-return.test b/tests/parser/yield-return.test
new file mode 100644
index 000000000..08256e0cf
--- /dev/null
+++ b/tests/parser/yield-return.test
@@ -0,0 +1,13 @@
+Invalid Code
+
+class Foo {
+ public async Foo () {
+ }
+}
+
+async Foo bar () {
+ yield return new Foo ();
+}
+
+void main () {
+}