summary refs log tree commit diff stats
path: root/tests/pragmas/tcustom_pragma.nim
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2020-11-05 18:31:44 +0800
committerGitHub <noreply@github.com>2020-11-05 18:31:44 +0800
commitfdd25ed19c7adccaf94984e02d4222596ec08224 (patch)
tree9454aeba9bfefa8add226478fb4c7226a787db93 /tests/pragmas/tcustom_pragma.nim
parent4c19c5dfae01638ae66fc2c1561762d94fb36a1a (diff)
downloadNim-fdd25ed19c7adccaf94984e02d4222596ec08224.tar.gz
close #8457 (#15844)
Diffstat (limited to 'tests/pragmas/tcustom_pragma.nim')
-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 756396529..a4a200c34 100644
--- a/tests/pragmas/tcustom_pragma.nim
+++ b/tests/pragmas/tcustom_pragma.nim
@@ -367,3 +367,14 @@ block:
   let x = RefType2()
   for fieldName, fieldSym in fieldPairs(x[]):
     doAssert hasCustomPragma(fieldSym, myCustomPragma)
+
+# bug 8457
+block:
+  template world {.pragma.}
+
+  type
+    Hello = ref object
+      a: float32
+      b {.world.}: int
+
+  discard Hello(a: 1.0, b: 12)