From 05d1c197f48d23aefa5284e04ce0fe1519ef0550 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Thu, 10 Oct 2019 16:54:17 +0200 Subject: [PATCH] :art: Reach Missing member template --- tests/error/template_dyn2.gw | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 tests/error/template_dyn2.gw diff --git a/tests/error/template_dyn2.gw b/tests/error/template_dyn2.gw new file mode 100644 index 00000000..32bbf37a --- /dev/null +++ b/tests/error/template_dyn2.gw @@ -0,0 +1,48 @@ +#! [contains] MissigTmplException +fun void test(C cc) { <<< cc.test(2) >>>; } + +fun void test(C cc, int i) { <<< 1 >>>; <<< cc.test(i, i) >>>; } + + +class C { + fun int test<~A~>(A a) { <<< " A ", a >>>; } + fun int test<~A~>(A a, int i) { <<< " ", a >>>; } + fun int test<~A~>(A a, int i, int j) { <<< a >>>; } +} +class D extends C { + fun int test<~A~>(A a, int i) { <<< this, " extent ", a, __func__ >>>; } +} +class E extends D { + fun int test<~A~>(A a, int i) { <<< this, " Extent ", a, _func__ >>>; } +} + + +<<< C c >>>; +<<< D d >>>; +<<< E e >>>; + +test(c); +test(d); +test(e); +test(c,1); +test(d,2); +test(e,3); +<<< test >>>; + + +c.test(1); +c.test(123,1); +c.test(1, 2, 3); + +d.test(2); +d.test(123,3); +d.test(2, 2, 3); + +e.test(3); +e.test(123,3); +e.test(3, 2, 3); + +fun void _test() {<<< "test" >>>; } +fun void test() { _test(); } +test(); + -- 2.43.0