diff options
author | LemonBoy <LemonBoy@users.noreply.github.com> | 2018-07-01 08:06:58 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-07-01 08:06:58 +0200 |
commit | 584d7783180d0b2417b0a2ffb955877c39660273 (patch) | |
tree | c6fd39b5a2d9fc3faf784b07b3141db35166ed18 /tests | |
parent | eec239e851c6be4922d9746d07a20c37c0157442 (diff) | |
download | Nim-584d7783180d0b2417b0a2ffb955877c39660273.tar.gz |
Fix use of custom pragmas in generic procs (#8165)
Fixes #7626
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pragmas/tcustom_pragma.nim | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/pragmas/tcustom_pragma.nim b/tests/pragmas/tcustom_pragma.nim index 33a4a7e65..cd1edccf6 100644 --- a/tests/pragmas/tcustom_pragma.nim +++ b/tests/pragmas/tcustom_pragma.nim @@ -137,4 +137,12 @@ block: static: assert hasIntSerKey assert strSerKey == "string" - assert nestedItemDefVal == "Nimmers of the world, unite!" \ No newline at end of file + assert nestedItemDefVal == "Nimmers of the world, unite!" + +block: + template simpleAttr {.pragma.} + + type Annotated {.simpleAttr.} = object + + proc generic_proc[T]() = + assert Annotated.hasCustomPragma(simpleAttr) \ No newline at end of file |