mirror of
https://github.com/astral-sh/ruff.git
synced 2026-11-21 12:16:15 +08:00
## Summary Use an unambiguously incompatible `list[str]` declaration in the loop-declaration regression. The earlier binding remains `list[int]`, while the loop assignment now matches the declared type, so the test isolates the incompatible pre-loop binding. The previous `list[object]` declaration could become valid under whole-scope bidirectional inference, making it an ambiguous example for this diagnostic. Follow-up to [review feedback on #27594](https://github.com/astral-sh/ruff/pull/27594#discussion_r3753906101).