summary refs log tree commit diff stats
path: root/tests/pragmas
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2021-04-15 13:55:50 +0200
committerGitHub <noreply@github.com>2021-04-15 13:55:50 +0200
commit51a40c1f38a8a03f745f1982cf74091a1c6f7315 (patch)
tree8838aafec117dd07b642daccc5eed8a8eb03bd98 /tests/pragmas
parentf8dce493d36c10bfdfb3bd4ac87eae7b96b97f1a (diff)
downloadNim-51a40c1f38a8a03f745f1982cf74091a1c6f7315.tar.gz
Fix getCustomPragmaVal for some multi arg pragmas (#17723)
* Fix getCustomPragmaVal for some multi arg pragmas

* Bootstrap fix
Diffstat (limited to 'tests/pragmas')
-rw-r--r--tests/pragmas/tcustom_pragma.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/pragmas/tcustom_pragma.nim b/tests/pragmas/tcustom_pragma.nim
index 55761d107..30b08b44e 100644
--- a/tests/pragmas/tcustom_pragma.nim
+++ b/tests/pragmas/tcustom_pragma.nim
@@ -396,3 +396,12 @@ block:
     newLit(hasAttr)
 
   doAssert hasMyAttr(TObj)
+
+# misc
+{.pragma: haha.}
+{.pragma: hoho.}
+template hehe(key, val: string, haha) {.pragma.}
+
+type A {.haha, hoho, haha, hehe("hi", "hu", "he").} = int
+
+assert A.getCustomPragmaVal(hehe) == (key: "hi", val: "hu", haha: "he")