summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2018-07-01 08:06:58 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-07-01 08:06:58 +0200
commit584d7783180d0b2417b0a2ffb955877c39660273 (patch)
treec6fd39b5a2d9fc3faf784b07b3141db35166ed18 /tests
parenteec239e851c6be4922d9746d07a20c37c0157442 (diff)
downloadNim-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.nim10
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