diff options
author | Zahary Karadjov <zahary@gmail.com> | 2015-01-02 17:51:52 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2015-01-02 23:58:24 +0200 |
commit | 5b32fb1791899a86afbb19a0c4e8d0ded0c362eb (patch) | |
tree | ae48e43080e678e0d7ad37e1a04db5d7c9936c16 | |
parent | b21b72dc14e389cb2d31646dc25a5ae0808a43a1 (diff) | |
download | Nim-5b32fb1791899a86afbb19a0c4e8d0ded0c362eb.tar.gz |
re-enable semistatic[T] as a test case
-rw-r--r-- | tests/metatype/tsemistatic.nim | 8 |
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 |