summaryrefslogtreecommitdiff
path: root/tests/parser
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2019-10-03 20:42:58 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2019-11-05 22:52:00 +0100
commit39331e235f1183223c8ea685e3501ab4ca932c8f (patch)
tree9264907c7299933da77034c7f064b794f19570e4 /tests/parser
parent7c367780af1677278ed83d6afc2c5933211c3155 (diff)
downloadvala-39331e235f1183223c8ea685e3501ab4ca932c8f.tar.gz
vala: Support "unowned var" to declare local variables
Based on patch by Aaron Andersen Fixes https://gitlab.gnome.org/GNOME/vala/issues/152
Diffstat (limited to 'tests/parser')
-rw-r--r--tests/parser/local-variable.vala10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/parser/local-variable.vala b/tests/parser/local-variable.vala
new file mode 100644
index 000000000..fc22135f0
--- /dev/null
+++ b/tests/parser/local-variable.vala
@@ -0,0 +1,10 @@
+void main () {
+ {
+ var foo = "foo";
+ var bar = 42;
+ }
+ {
+ unowned var foo = "foo";
+ unowned var bar = 42;
+ }
+}