diff options
Diffstat (limited to 'tests/stdlib')
-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" |