tester reports ignored tests and supports 'nimout'; fixes #2211
This commit is contained in:
parent
dc8b07fe0b
commit
335c19c869
7 changed files with 48 additions and 10 deletions
17
tests/macros/typesapi.nim
Normal file
17
tests/macros/typesapi.nim
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
discard """
|
||||
nimout: '''proc (x: int): string => typeDesc[proc[string, int]]
|
||||
proc (x: int): void => typeDesc[proc[void, int]]
|
||||
proc (x: int) => typeDesc[proc[void, int]]'''
|
||||
"""
|
||||
|
||||
#2211
|
||||
|
||||
import macros
|
||||
|
||||
macro showType(t:stmt): stmt =
|
||||
let ty = t.getType
|
||||
echo t.repr, " => ", ty.repr
|
||||
|
||||
showType(proc(x:int): string)
|
||||
showType(proc(x:int): void)
|
||||
showType(proc(x:int))
|
||||
Loading…
Add table
Add a link
Reference in a new issue