documented static params

This commit is contained in:
Zahary Karadjov
2013-12-25 00:01:12 +02:00
parent 027f30610e
commit 952dbc4b8f
3 changed files with 66 additions and 0 deletions

View File

@@ -2675,3 +2675,13 @@ proc locals*(): TObject {.magic: "Locals", noSideEffect.} =
## the official signature says, the return type is not ``TObject`` but a
## tuple of a structure that depends on the current scope.
nil
when not defined(booting):
type
semistatic*[T] = static[T] | T
# indicates a param of proc specialized for each static value,
# but also accepting run-time values
template isStatic*(x): expr = compiles(static(x))
# checks whether `x` is a value known at compile-time