]> Nishi Git Mirror - gwion.git/commitdiff
:art: Add tests for 'Ref:[T]'
authorJérémie Astor <fennecdjay@gmail.com>
Sat, 27 Feb 2021 16:55:21 +0000 (17:55 +0100)
committerJérémie Astor <fennecdjay@gmail.com>
Sat, 27 Feb 2021 16:55:21 +0000 (17:55 +0100)
tests/ref/ref.gw [new file with mode: 0644]
tests/ref/ref_infer.gw [new file with mode: 0644]

diff --git a/tests/ref/ref.gw b/tests/ref/ref.gw
new file mode 100644 (file)
index 0000000..a53e460
--- /dev/null
@@ -0,0 +1,9 @@
+fun void inc(Ref:[int] a) {
+   <<< a >>>;
+   ++a;
+   <<< a >>>;
+}
+
+12 => var int i;
+i => inc;
+<<< i >>>;
diff --git a/tests/ref/ref_infer.gw b/tests/ref/ref_infer.gw
new file mode 100644 (file)
index 0000000..8f7d78b
--- /dev/null
@@ -0,0 +1 @@
+var &int i;