From 9a6ad4cd22c8fc7c6e11478a02c14164e8da9349 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sat, 27 Feb 2021 17:55:21 +0100 Subject: [PATCH] :art: Add tests for 'Ref:[T]' --- tests/ref/ref.gw | 9 +++++++++ tests/ref/ref_infer.gw | 1 + 2 files changed, 10 insertions(+) create mode 100644 tests/ref/ref.gw create mode 100644 tests/ref/ref_infer.gw diff --git a/tests/ref/ref.gw b/tests/ref/ref.gw new file mode 100644 index 00000000..a53e460b --- /dev/null +++ b/tests/ref/ref.gw @@ -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 index 00000000..8f7d78b2 --- /dev/null +++ b/tests/ref/ref_infer.gw @@ -0,0 +1 @@ +var &int i; -- 2.43.0