From: Jérémie Astor Date: Tue, 7 Jul 2020 17:15:02 +0000 (+0200) Subject: :art: No shadowing in tests X-Git-Tag: nightly~1451 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=a15714e923827f211f851ca1296e9a5fbd800d2c;p=gwion.git :art: No shadowing in tests --- diff --git a/examples/implicit_ptr.gw b/examples/implicit_ptr.gw index 139cc991..e1ab8ab5 100644 --- a/examples/implicit_ptr.gw +++ b/examples/implicit_ptr.gw @@ -1,4 +1,4 @@ -fun void test(<~int~>Ptr pi) { - <<< *pi >>>; +fun void test(<~int~>Ptr p) { + <<< *p >>>; } int i => test; diff --git a/tests/error/lambda_mismatch3.gw b/tests/error/lambda_mismatch3.gw index 03e785f0..572051d6 100644 --- a/tests/error/lambda_mismatch3.gw +++ b/tests/error/lambda_mismatch3.gw @@ -1,7 +1,7 @@ #! [contains] argument number does not match for lambda typedef void ptr_t(int i); \a b { <<< a, " ", b >>>; } @=> ptr_t ptr; -fun void test(ptr_t ptr) { - ptr(2); +fun void test(ptr_t p) { + p(2); } test(ptr); diff --git a/tests/new/class_fptr_returns_fptr.gw b/tests/new/class_fptr_returns_fptr.gw index 6756a1c7..19646d19 100644 --- a/tests/new/class_fptr_returns_fptr.gw +++ b/tests/new/class_fptr_returns_fptr.gw @@ -1,5 +1,5 @@ class C { -int i; +int m_i; typedef void t_fptr0(); typedef void t_fptr1(int i); fun void test() { <<< this , " ", __func__ >>>;} diff --git a/tests/new/lambda2.gw b/tests/new/lambda2.gw index 7414ab6c..5597c94e 100644 --- a/tests/new/lambda2.gw +++ b/tests/new/lambda2.gw @@ -3,9 +3,9 @@ typedef void ptr_t(int i); \a { <<< this, " ", a >>>; } @=> ptr_t ptr; #!ptr(3); fun void t1(int i) { <<< this, " t1 ", i >>>; } -fun void test(ptr_t ptr) { +fun void test(ptr_t p) { <<< this >>>; - ptr(1); + p(1); } t1 @=> ptr_t t1p; #!test(t1$ptr_t); diff --git a/tests/tree/class_template.gw b/tests/tree/class_template.gw index 6b10dd70..ea552355 100644 --- a/tests/tree/class_template.gw +++ b/tests/tree/class_template.gw @@ -4,8 +4,8 @@ class<~A,B~> C { fun A test() { <<< "lol" >>>; } - fun void test2<~C~>(C c) { - <<< c >>>; + fun void test2<~C~>(C o) { + <<< o >>>; } } diff --git a/tests/tree/f2i_cast.gw b/tests/tree/f2i_cast.gw index a6ec6d6a..6dedfaaa 100644 --- a/tests/tree/f2i_cast.gw +++ b/tests/tree/f2i_cast.gw @@ -1,5 +1,5 @@ <<< "test" >>>; <<< 2.3 $ int >>>; 1 => float f; -fun void test(float f){} +fun void test(float _f){} 1 => test;