Files
Nim/tests/iter
Ryan McConnell f8e470eb57 fix: {.cast(uncheckedAssign).} ineffective across yield in closure iterators (#25916)
closureiters.nim splits a stmt list at yield points, moving post-yield
code into a new state body. When that stmt list was inside a pragma
block like `{.cast(uncheckedAssign).}`, the new state's body was created
as a bare nkStmtList without the wrapper.

Fix: track the enclosing pragma block in the transform context, and wrap
newly-created state bodies in a copy of it when the split occurs inside
one. Added an explicit `nkPragmaBlock` case to
`transformClosureIteratorBody` that saves/restores `ctx.enclosingPragma`
around its body.
2026-06-16 19:15:16 +02:00
..
2021-03-24 08:49:05 +01:00
2015-01-11 13:51:30 +01:00
2019-05-03 23:43:41 +02:00
2014-01-13 02:10:03 +01:00
2019-11-05 11:05:46 +01:00
2019-11-05 16:55:08 +01:00
2019-05-13 20:50:21 +02:00
2019-05-13 20:50:21 +02:00
2019-05-13 20:50:21 +02:00
2018-12-11 21:23:21 +01:00
2014-01-13 02:10:03 +01:00
2015-07-14 01:37:07 +02:00
2026-03-16 16:56:18 +01:00