|
Previously, the added testcase failed with (when running with -Ydebug-alias):
2 | def foo = Seq(a)
| ^
|covariant type A occurs in invariant position in type => Seq.CC[Cov.this.A] of method foo
Because the type parameter of `CC` is invariant.
Of course, this is fine because `CC[A]` can be reduced to `Seq[A]`, but
before this commit, `TypeApplications#appliedTo` used to disallow
reductions that replaced an invariant type parameter with a variant one.
I believe that for type inference, only preserving the arity is
important, so I removed this restriction.
|