-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
Strong mode inference for generics gathers constraints on the type (lower and upper bounds), and uses that to find a type that satisfies the bounds (in practice, it will pick either the lower or the upper). Right now, these bounds are computed using LUB and GLB as appropriate to combine constraints. But that causes us to synthesize a type that the user did not write down anywhere, not to mention depending on the LUB/GLB functions.
I tried a switch to min/max but it causes a lot of churn in tests, so I'd like to handle this as a separate issue from our other inference changes.
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug