added system.typed and system.untyped aliases
This commit is contained in:
parent
5bb3534f10
commit
82f8948a10
4 changed files with 12 additions and 6 deletions
|
|
@ -3,12 +3,12 @@ discard """
|
|||
line: 18
|
||||
errormsg: "undeclared identifier: \'b\'"
|
||||
"""
|
||||
template declareInScope(x: expr, t: typeDesc): stmt {.immediate.} =
|
||||
template declareInScope(x: untyped, t: typeDesc): untyped {.immediate.} =
|
||||
var x: t
|
||||
|
||||
template declareInNewScope(x: expr, t: typeDesc): stmt {.immediate.} =
|
||||
|
||||
template declareInNewScope(x: untyped, t: typeDesc): untyped {.immediate.} =
|
||||
# open a new scope:
|
||||
block:
|
||||
block:
|
||||
var x: t
|
||||
|
||||
declareInScope(a, int)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue