Allow custom pragma on iterators [backport] (#20344)

Allow custom pragma on iterators
This commit is contained in:
Tanguy 2022-09-16 20:10:47 +02:00 • committed by GitHub
commit 3a5e38ab9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -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.}