re-enable semistatic[T] as a test case

This commit is contained in:
Zahary Karadjov
2015-01-02 17:51:52 +02:00
parent b21b72dc14
commit 5b32fb1791

View File

@@ -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