diff options
author | Clyybber <darkmine956@gmail.com> | 2021-06-16 02:45:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-16 02:45:05 +0200 |
commit | c5cf21c0c4f314e4128658d35000339d67e4824b (patch) | |
tree | b779ea5b14538bdd0b471d6866cdc9474c76ca3c /tests | |
parent | d3b27eb63e18fbe36a7579a3322db316115a3d81 (diff) | |
download | Nim-c5cf21c0c4f314e4128658d35000339d67e4824b.tar.gz |
Don't report unused hints for consumed AST (#18270)
* Fix #18203 * Add testcase * Fix testcase * Fix test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/macros/t18203.nim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/macros/t18203.nim b/tests/macros/t18203.nim new file mode 100644 index 000000000..aae0a2690 --- /dev/null +++ b/tests/macros/t18203.nim @@ -0,0 +1,15 @@ +discard """ + matrix: "--hint:SuccessX:off --hint:Link:off --hint:Conf:off --hint:CC:off --hint:XDeclaredButNotUsed:on" + nimout: ''' +''' +nimoutFull: true +action: compile +""" + +# bug #18203 +import std/macros + +macro foo(x: typed) = newProc ident"bar" +proc bar() {.foo.} = raise +bar() + |