diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-09-22 14:44:40 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-09-22 16:28:33 +0200 |
commit | 898e45a6ff6129fc5c674af48118042dd64123ff (patch) | |
tree | 9d87af16507e5710862eeeca57696ca922341e36 /tests/parser | |
parent | ce7c31eaff13fcd8c2da7a0d52deb8f97043df24 (diff) | |
download | vala-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.test | 13 |
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 () { +} |