ruff/crates/ty_python_semantic/resources/mdtest/narrow/conditionals
Shunsuke Shibayama 462adfd0e6
[ty] fix incorrect member narrowing (#19802)
## Summary

Reported in:
https://github.com/astral-sh/ruff/pull/19795#issuecomment-3161981945

If a root expression is reassigned, narrowing on the member should be
invalidated, but there was an oversight in the current implementation.

This PR fixes that, and also removes some unnecessary handling.

## Test Plan

New tests cases in `narrow/conditionals/nested.md`.
2025-08-07 16:04:07 -07:00
..
boolean.md [ty] Reachability constraints (#18621) 2025-06-17 09:24:28 +02:00
elif_else.md [ty] Improve disjointness inference for NominalInstanceTypes and SubclassOfTypes (#18864) 2025-06-24 20:27:37 +00:00
eq.md [ty] Expansion of enums into unions of literals (#19382) 2025-07-21 19:37:55 +02:00
in.md
is.md [ty] Expansion of enums into unions of literals (#19382) 2025-07-21 19:37:55 +02:00
is_not.md [ty] Expansion of enums into unions of literals (#19382) 2025-07-21 19:37:55 +02:00
nested.md [ty] fix incorrect member narrowing (#19802) 2025-08-07 16:04:07 -07:00
not.md