add testcase for #19020 (#20363)

This commit is contained in:
ringabout
2022-09-15 23:18:14 +08:00
committed by GitHub
parent 3e83c4a168
commit cd9290818a

View File

@@ -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"