Return an error symbol as macro output if needed (#8116)

Return an error symbol if the macro output has no type and a typedesc
is expected.

Fixes #7454
This commit is contained in:
LemonBoy
2018-06-27 21:43:08 +02:00
committed by Andreas Rumpf
parent 7f148838a4
commit 52fc16d5d2
2 changed files with 14 additions and 1 deletions

8
tests/macros/t7454.nim Normal file
View File

@@ -0,0 +1,8 @@
discard """
errormsg: "expression has no type:"
line: 8
"""
macro p(t: typedesc): typedesc =
discard
var a: p(int)