From cd9290818ad3cba428b26698b79d42c7e57731d1 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 15 Sep 2022 23:18:14 +0800 Subject: add testcase for #19020 (#20363) --- tests/stdlib/tmacros.nim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/stdlib') 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" -- cgit 1.4.1-2-gfad0