From: fennecdjay Date: Wed, 29 Jun 2022 23:08:31 +0000 (+0200) Subject: :white_check_mark: Add test X-Git-Tag: nightly~264^2~122 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=f519a6791d550b1f95485c7f5f3c1f1f3186db12;p=gwion.git :white_check_mark: Add test --- diff --git a/tests/fptr/fptr_cast.gw b/tests/fptr/fptr_cast.gw new file mode 100644 index 00000000..a79971cf --- /dev/null +++ b/tests/fptr/fptr_cast.gw @@ -0,0 +1,3 @@ +\ a { return 2; }(2); +(\ a { return 2; } $ (int(int))); +#!\ a { return 2; }(3); diff --git a/tests/tree/inherit_func.gw b/tests/tree/inherit_func.gw new file mode 100644 index 00000000..02e75366 --- /dev/null +++ b/tests/tree/inherit_func.gw @@ -0,0 +1,14 @@ +#! [contains] baz + +#! check that functions are called from the vtable + +class C { + fun void foo() { <<< "bar" >>>; } +} + +class D extends C{ + fun void foo() { <<< "baz" >>>; } +} + +var D d; +d.foo();