mirror of https://github.com/astral-sh/ruff
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. |
||
|---|---|---|
| .. | ||
| legacy | ||
| pep695 | ||
| builtins.md | ||
| scoping.md | ||
| specialize_constrained.md | ||