summaryrefslogtreecommitdiff
path: root/tests/parser
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2020-09-17 15:16:59 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2020-09-17 15:16:59 +0200
commit69cc119d0db1b05e581647105e30875136948fa3 (patch)
treeb30bda1b1c45e83303f54f6b40e714b2310419f5 /tests/parser
parentfec5844439e3186a2fdb0c3754ab7988e57c3400 (diff)
downloadvala-69cc119d0db1b05e581647105e30875136948fa3.tar.gz
vala: Improve parsing of with-statement and allow it as embedded statement
Diffstat (limited to 'tests/parser')
-rw-r--r--tests/parser/with-embedded.vala8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/parser/with-embedded.vala b/tests/parser/with-embedded.vala
index c668e5afc..6f61891d1 100644
--- a/tests/parser/with-embedded.vala
+++ b/tests/parser/with-embedded.vala
@@ -1,4 +1,8 @@
void main () {
- with (10)
- assert (to_string () == "10");
+ if (true)
+ with ("foo")
+ assert (to_string () == "foo");
+
+ with (10)
+ assert (to_string () == "10");
}