You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decouple variances from type lambdas. A type lambda is just
a function from types to types, it does not have a declared
parameter variance. Of course, the variance of a type parameter
can be determined by tracking occurrences of the parameter
on the right hand side. That's a structural criterion, not
a user-defined one.
Intead of storing variances in type lambdas, store them in
TypeBounds types. A non-alias type bound can have a declared
parameter variance.
The hope is that this change clarifies things conceptually
and addresses tricky type inference problems that involve
type aliases.
First commit: Change TypeBounds data structures so that they can
contain type parameter variances.
0 commit comments