From: Jérémie Astor Date: Sat, 27 Feb 2021 16:55:21 +0000 (+0100) Subject: :art: Add tests for 'Ref:[T]' X-Git-Tag: nightly~913 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=9a6ad4cd22c8fc7c6e11478a02c14164e8da9349;p=gwion.git :art: Add tests for 'Ref:[T]' --- 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;