Trim remaining expr/stmt from stdlib (#6742)

This commit is contained in:
Lynn C. Rees 2017-11-15 09:34:48 -07:00 • committed by Andreas Rumpf
commit 0ab373115c
9 changed files with 16 additions and 16 deletions

View file

@ -2763,9 +2763,9 @@ when defined(nimvarargstyped):
## pretends to be free of side effects, so that it can be used for debugging
## routines marked as `noSideEffect <manual.html#pragmas-nosideeffect-pragma>`_.
else:
proc echo*(x: varargs[expr, `$`]) {.magic: "Echo", tags: [WriteIOEffect],
proc echo*(x: varargs[untyped, `$`]) {.magic: "Echo", tags: [WriteIOEffect],
benign, sideEffect.}
proc debugEcho*(x: varargs[expr, `$`]) {.magic: "Echo", noSideEffect,
proc debugEcho*(x: varargs[untyped, `$`]) {.magic: "Echo", noSideEffect,
tags: [], raises: [].}
template newException*(exceptn: typedesc, message: string;
@ -3706,7 +3706,7 @@ proc instantiationInfo*(index = -1, fullPaths = false): tuple[
## .. code-block:: nim
## import strutils
##
## template testException(exception, code: expr): stmt =
## template testException(exception, code: untyped): typed =
## try:
## let pos = instantiationInfo()
## discard(code)
@ -3844,11 +3844,11 @@ type
{.deprecated: [PNimrodNode: NimNode].}
when false:
template eval*(blk: stmt): stmt =
template eval*(blk: typed): typed =
## executes a block of code at compile time just as if it was a macro
## optionally, the block can return an AST tree that will replace the
## eval expression
macro payload: stmt {.gensym.} = blk
macro payload: typed {.gensym.} = blk
payload()
when hasAlloc: