Files
Nim/tests/iter
dxxb 5ddae390f2 Fix inconsistent env type with nested procs in iterators (#21242) (#25699)
Nested transformBody/liftLambdas passes used a fresh DetectionPass, so
getEnvTypeForOwner could allocate a duplicate PType for the same owner
while :envP already referenced the inner pass type. When addClosureParam
saw cp.typ != t, it errored.

If both types are env objects for the same routine owner, reuse cp.typ
and sync ownerToType.

Adds regression test tests/iter/t21242_nested_closure_in_iter.nim.

(cherry picked from commit 0028ea563c)
2026-04-07 08:34:55 +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-17 10:12:06 +01:00