From 09e6cad37d4559f83cd27075f0c7c1524d502321 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 18 Jul 2025 22:11:12 +0300 Subject: add initial value handling + No type checking, shouldn't be too tricky to add in though --- tests/xok/val.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/xok/val.c (limited to 'tests/xok/val.c') 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 + +typedef tmpl[](int v){ + int <>_ok() + { + return v; + } +}; + +typedef inst = tmpl[](20); + +int main() +{ + int ok = inst_ok(); + if (ok == 20) + puts("OK"); +} -- cgit v1.2.3