mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 10:22:15 +00:00
re-enable semistatic[T] as a test case
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user