summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorcooldome <cdome@bk.ru>2018-07-09 12:11:03 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-07-09 12:11:03 +0200
commitdec97924a4bb6a719380475de46485ce71eeb56c (patch)
tree64b7c173ad77e117b070eb5e5ea91c96c5712bc0 /tests
parentc115090f6e6bdc6b47fa41f73e0a83f95644c56c (diff)
downloadNim-dec97924a4bb6a719380475de46485ce71eeb56c.tar.gz
Custom pragmas in proc types (#8205)
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 cd1edccf6..a5f86b54d 100644
--- a/tests/pragmas/tcustom_pragma.nim
+++ b/tests/pragmas/tcustom_pragma.nim
@@ -145,4 +145,12 @@ block:
   type Annotated {.simpleAttr.} = object
 
   proc generic_proc[T]() =
-    assert Annotated.hasCustomPragma(simpleAttr)
\ No newline at end of file
+    assert Annotated.hasCustomPragma(simpleAttr)
+
+
+#--------------------------------------------------------------------------
+# Pragma on proc type
+
+let a: proc(x: int) {.defaultValue(5).} = nil
+static:
+  doAssert hasCustomPragma(a.type, defaultValue)