ruff/crates/ty_python_semantic/resources/mdtest/generics
Douglas Creager 7e277667d1
[ty] Distinguish "unconstrained" from "constrained to any type" (#21539)
Before, we would collapse any constraint of the form `Never ≤ T ≤
object` down to the "always true" constraint set. This is correct in
terms of BDD semantics, but loses information, since "not constraining a
typevar at all" is different than "constraining a typevar to take on any
type". Once we get to specialization inference, we should fall back on
the typevar's default for the former, but not for the latter.

This is much easier to support now that we have a sequent map, since we
need to treat `¬(Never ≤ T ≤ object)` as being impossible, and prune it
when we walk through BDD paths, just like we do for other impossible
combinations.
2025-11-24 15:23:09 -05:00
..
legacy [ty] Create a specialization from a constraint set (#21414) 2025-11-19 14:20:33 -05:00
pep695 [ty] Remove brittle constraint set reveal tests (#21568) 2025-11-21 13:57:55 -05:00
builtins.md [ty] Support using legacy typing aliases for generic classes in type annotations (#18404) 2025-06-03 12:09:51 +01:00
scoping.md [ty] Create a specialization from a constraint set (#21414) 2025-11-19 14:20:33 -05:00
specialize_constrained.md [ty] Distinguish "unconstrained" from "constrained to any type" (#21539) 2025-11-24 15:23:09 -05:00