350b7b49b6a06aae881f11a531419b8f510a63cf
When an identifier is used as an upvalue within a nested scope (e.g., a `while` loop), the type checker needs to apply the global substitution map to resolve `TypeVar`s that might have been determined in outer scopes. This ensures that the correct type is used even if `ctx.set_type` couldn't propagate the change directly through the upvalue address. This fix also includes a regression test to specifically cover this scenario with series and closures.
Description
No description provided
Languages
Rust
100%