summary refs log tree commit diff stats
path: root/tests/pragmas
diff options
context:
space:
mode:
authorcooldome <cdome@bk.ru>2020-04-08 10:28:09 +0100
committerGitHub <noreply@github.com>2020-04-08 11:28:09 +0200
commitf86fc5316af480336a2dcd899b3f7288819914e7 (patch)
tree24f915267a442847da8041f68b676270c6cfbcc2 /tests/pragmas
parent95fd8ae93ce8732eb5a979d4cd63e0350594318d (diff)
downloadNim-f86fc5316af480336a2dcd899b3f7288819914e7.tar.gz
fix #13909 (#13914) [backport:1.2]
Co-authored-by: cooldome <ariabushenko@bk.ru>
Diffstat (limited to 'tests/pragmas')
-rw-r--r--tests/pragmas/tcustom_pragma.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/pragmas/tcustom_pragma.nim b/tests/pragmas/tcustom_pragma.nim
index 2d970aba1..b306045e0 100644
--- a/tests/pragmas/tcustom_pragma.nim
+++ b/tests/pragmas/tcustom_pragma.nim
@@ -335,3 +335,14 @@ ProcDef
 
   static: assert bar("x") == "x"
 
+#------------------------------------------------------
+# issue #13909
+
+template dependency*(id: string, weight = 0.0) {.pragma.}
+
+type
+  MyObject* = object
+    provider*: proc(obj: string): pointer {.dependency("Data/" & obj, 16.1), noSideEffect.}
+
+proc myproc(obj: string): string {.dependency("Data/" & obj, 16.1).} =
+  result = obj
\ No newline at end of file