add testcase for #19020 (#20363)

This commit is contained in:
ringabout 2022-09-15 23:18:14 +08:00 • committed by GitHub
commit cd9290818a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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"