summary refs log tree commit diff stats
path: root/tests/iter/t22619.nim
Commit message (Collapse)AuthorAgeFilesLines
* fixes #22619; don't lift cursor fields in the hook calls (#22638)ringabout2023-09-051-0/+79
fixes https://github.com/nim-lang/Nim/issues/22619 It causes double free for closure iterators because cursor fields are destroyed in the lifted destructors of `Env`. Besides, according to the Nim manual > In fact, cursor more generally prevents object construction/destruction pairs and so can also be useful in other contexts. At least, destruction of cursor fields might cause troubles. todo - [x] tests - [x] revert a certain old PR --------- Co-authored-by: zerbina <100542850+zerbina@users.noreply.github.com>