Fix use of custom pragmas in generic procs (#8165)

Fixes #7626
This commit is contained in:
LemonBoy 2018-07-01 08:06:58 +02:00 • committed by Andreas Rumpf
commit 584d778318
2 changed files with 11 additions and 2 deletions

View file

@ -137,4 +137,12 @@ block:
static:
assert hasIntSerKey
assert strSerKey == "string"
assert nestedItemDefVal == "Nimmers of the world, unite!"
assert nestedItemDefVal == "Nimmers of the world, unite!"
block:
template simpleAttr {.pragma.}
type Annotated {.simpleAttr.} = object
proc generic_proc[T]() =
assert Annotated.hasCustomPragma(simpleAttr)