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