-
Notifications
You must be signed in to change notification settings - Fork 216
Open
1 / 11 of 1 issue completedOpen
1 / 11 of 1 issue completed
Copy link
Labels
Milestone
Description
When we fixpoint-iterate a cycle, we union the resulting types at each iteration with the previous iteration, to ensure monotonicity.
This has an unfortunate side effect when the types involved are invariant generics or generics specialized with dynamic types; in those cases the unions don't simplify, and this can lead to undesired behavior. See for example the TODO unsupported-base errors in mdtest/generics/legacy/classes.md, or the TODOs for spurious unions with Divergent added in call/methods.md in astral-sh/ruff#21551. These can both occur in reasonably common cases and show up in the ecosystem.
(The latter TODOs might also be resolvable by fixing #1729 to eliminate the seemingly-unnecessary cycle.)
Reactions are currently unavailable