Allow void macro result (#11286)
* allow void macro result * add test for void macro result type
This commit is contained in:
parent
68b5e3e3fe
commit
f94ec363ab
25 changed files with 143 additions and 60 deletions
|
|
@ -567,7 +567,7 @@ proc quote*(bl: typed, op = "``"): NimNode {.magic: "QuoteAst", noSideEffect.}
|
|||
##
|
||||
## .. code-block:: nim
|
||||
##
|
||||
## macro check(ex: untyped): typed =
|
||||
## macro check(ex: untyped) =
|
||||
## # this is a simplified version of the check macro from the
|
||||
## # unittest module.
|
||||
##
|
||||
|
|
|
|||
|
|
@ -572,7 +572,7 @@ when not useUnicode:
|
|||
proc isTitle(a: char): bool {.inline.} = return false
|
||||
proc isWhiteSpace(a: char): bool {.inline.} = return a in {' ', '\9'..'\13'}
|
||||
|
||||
template matchOrParse(mopProc: untyped): typed =
|
||||
template matchOrParse(mopProc: untyped) =
|
||||
# Used to make the main matcher proc *rawMatch* as well as event parser
|
||||
# procs. For the former, *enter* and *leave* event handler code generators
|
||||
# are provided which just return *discard*.
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ template onFailedAssert*(msg, code: untyped): untyped {.dirty.} =
|
|||
let msg = msgIMPL
|
||||
code
|
||||
|
||||
template doAssertRaises*(exception: typedesc, code: untyped): typed =
|
||||
template doAssertRaises*(exception: typedesc, code: untyped) =
|
||||
## Raises ``AssertionError`` if specified ``code`` does not raise the
|
||||
## specified exception. Example:
|
||||
##
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue