diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-09-15 23:18:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-15 23:18:14 +0800 |
commit | cd9290818ad3cba428b26698b79d42c7e57731d1 (patch) | |
tree | 0200b4a0a13c9c31814feded3f43b64cec7dc569 /tests/stdlib/tmacros.nim | |
parent | 3e83c4a168e55880af45273b9c6bc07d78a7d863 (diff) | |
download | Nim-cd9290818ad3cba428b26698b79d42c7e57731d1.tar.gz |
add testcase for #19020 (#20363)
Diffstat (limited to 'tests/stdlib/tmacros.nim')
-rw-r--r-- | tests/stdlib/tmacros.nim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/stdlib/tmacros.nim b/tests/stdlib/tmacros.nim index 299eac49b..27553667a 100644 --- a/tests/stdlib/tmacros.nim +++ b/tests/stdlib/tmacros.nim @@ -144,3 +144,15 @@ block: # extractDocCommentsAndRunnables proc c() {.checkComments("Hello world").} = ## Hello world + +block: # bug #19020 + type + foo = object + + template typ(T:typedesc) {.pragma.} + + proc bar() {.typ: foo.} = discard + + static: + doAssert $bar.getCustomPragmaVal(typ) == "foo" + doAssert $bar.getCustomPragmaVal(typ) == "foo" |