diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-10-03 20:42:58 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-11-05 22:52:00 +0100 |
commit | 39331e235f1183223c8ea685e3501ab4ca932c8f (patch) | |
tree | 9264907c7299933da77034c7f064b794f19570e4 /tests/parser | |
parent | 7c367780af1677278ed83d6afc2c5933211c3155 (diff) | |
download | vala-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.vala | 10 |
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; + } +} |