diff options
Diffstat (limited to 'tests/macros')
-rw-r--r-- | tests/macros/tgettype.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/macros/tgettype.nim b/tests/macros/tgettype.nim index 8b787b022..fa02bce57 100644 --- a/tests/macros/tgettype.nim +++ b/tests/macros/tgettype.nim @@ -18,3 +18,10 @@ macro testGeneric(T: typedesc[Model]): string= echo testUser echo User.testGeneric + +macro assertVoid(e: typed): untyped = + assert(getTypeInst(e).typeKind == ntyVoid) + +proc voidProc() = discard + +assertVoid voidProc() |