Skip to content

Commit

Permalink
add testcase for #19020
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout committed Sep 15, 2022
1 parent 2e8c016 commit 5c9c0da
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 5c9c0da

Please sign in to comment.