diff options
author | Tanguy <tanguy@status.im> | 2022-09-16 20:10:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-17 02:10:47 +0800 |
commit | 3a5e38ab9dd560ae8e29e66980b1cc4bbf45ebaf (patch) | |
tree | bb607e5dff0ded0f57d1100d33ff69404ba8dcd5 /tests/pragmas | |
parent | d44b547144e2db5ec7083219a77b318d4dff0133 (diff) | |
download | Nim-3a5e38ab9dd560ae8e29e66980b1cc4bbf45ebaf.tar.gz |
Allow custom pragma on iterators [backport] (#20344)
Allow custom pragma on iterators
Diffstat (limited to 'tests/pragmas')
-rw-r--r-- | tests/pragmas/tcustom_pragma.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/pragmas/tcustom_pragma.nim b/tests/pragmas/tcustom_pragma.nim index db2536188..b624f32ba 100644 --- a/tests/pragmas/tcustom_pragma.nim +++ b/tests/pragmas/tcustom_pragma.nim @@ -399,6 +399,13 @@ block: discard Hello(a: 1.0, b: 12) +# custom pragma on iterators +block: + template prag {.pragma.} + {.push prag.} + proc hello = discard + iterator hello2: int = discard + # issue #11511 when false: template myAttr {.pragma.} |