diff options
-rw-r--r-- | tests/pragmas/tcustom_pragma.nim | 11 |
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) |