From b100c675151465a04598547830fd6427e970a95f Mon Sep 17 00:00:00 2001 From: flywind <43030857+xflywind@users.noreply.github.com> Date: Thu, 5 Nov 2020 18:31:44 +0800 Subject: [PATCH] close #8457 (#15844) (cherry picked from commit fdd25ed19c7adccaf94984e02d4222596ec08224) --- tests/pragmas/tcustom_pragma.nim | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/pragmas/tcustom_pragma.nim b/tests/pragmas/tcustom_pragma.nim index 7563965293..a4a200c34b 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)