Skip to content

Commit

Permalink
add testcase for #19020 (#20363)
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout authored Sep 15, 2022
1 parent 3e83c4a commit cd92908
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/stdlib/tmacros.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit cd92908

Please sign in to comment.