From 94b767679fc68c51aa0c80bdada35b9978989199 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 18 Jul 2025 21:33:50 +0300 Subject: add supertemplate handling --- tests/xok/supertmpl.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/xok/supertmpl.c (limited to 'tests/xok/supertmpl.c') diff --git a/tests/xok/supertmpl.c b/tests/xok/supertmpl.c new file mode 100644 index 0000000..bc946fb --- /dev/null +++ b/tests/xok/supertmpl.c @@ -0,0 +1,24 @@ +#include + +typedef tmpl[](){ + int <>_ok() + { + return 20; + } +}; + +typedef supertmpl[]() = tmpl[]() { + int <>_superok() + { + return <>_ok(); + } +}; + +typedef inst = supertmpl[](); + +int main() +{ + int ok = inst_superok(); + if (ok == 20) + puts("OK"); +} -- cgit v1.2.3