aboutsummaryrefslogtreecommitdiff
path: root/tests/xok/superval.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/xok/superval.c')
-rw-r--r--tests/xok/superval.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/xok/superval.c b/tests/xok/superval.c
new file mode 100644
index 0000000..f6903c2
--- /dev/null
+++ b/tests/xok/superval.c
@@ -0,0 +1,24 @@
+#include <stdio.h>
+
+typedef tmpl[](int v){
+ int <>_ok()
+ {
+ return v;
+ }
+};
+
+typedef supertmpl[](int v) = tmpl[](v) {
+ int <>_superok()
+ {
+ return <>_ok();
+ }
+}
+
+typedef inst = supertmpl[](20);
+
+int main()
+{
+ int ok = inst_superok();
+ if (ok == 20)
+ puts("OK");
+}