diff options
author | LemonBoy <LemonBoy@users.noreply.github.com> | 2018-06-27 21:43:08 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-06-27 21:43:07 +0200 |
commit | 52fc16d5d2f152df1cfc26ae1eb8df92f77ee7cb (patch) | |
tree | d2cbd72eecba7ee8b45944da2efa12fcf05ff895 /tests/macros | |
parent | 7f148838a461397f75853945e33eef29583dcc57 (diff) | |
download | Nim-52fc16d5d2f152df1cfc26ae1eb8df92f77ee7cb.tar.gz |
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
Diffstat (limited to 'tests/macros')
-rw-r--r-- | tests/macros/t7454.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/macros/t7454.nim b/tests/macros/t7454.nim new file mode 100644 index 000000000..e527de0c3 --- /dev/null +++ b/tests/macros/t7454.nim @@ -0,0 +1,8 @@ +discard """ +errormsg: "expression has no type:" +line: 8 +""" + +macro p(t: typedesc): typedesc = + discard +var a: p(int) |