summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tests/metatype/tsemistatic.nim8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/metatype/tsemistatic.nim b/tests/metatype/tsemistatic.nim
index 0a003be03..a13175ba8 100644
--- a/tests/metatype/tsemistatic.nim
+++ b/tests/metatype/tsemistatic.nim
@@ -1,9 +1,15 @@
 discard """
   msg: "static 10\ndynamic\nstatic 20\n"
   output: "s\nd\nd\ns"
-  disabled: "true"
 """
 
+type
+  semistatic[T] =
+    static[T] or T
+
+template isStatic*(x): expr =
+  compiles(static(x))
+
 proc foo(x: semistatic[int]) =
   when isStatic(x):
     static: echo "static ", x