aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i1181c.scala
Commit message (Collapse)AuthorAgeFilesLines
* Update tests to use new PolyType syntax.Martin Odersky2016-10-121-1/+1
|
* HK reduction: Remove special-case for typerefsGuillaume Martres2016-07-181-0/+11
The special case: case stripped: TypeRef => stripped.symbol.is(BaseTypeArg) is wrong because you might still want to reduce applications involving TypeRefs which are not base class parameters, like in: class Foo[A] type Alias[X] = Foo[X] val x: Alias[Int] = ??? `Alias` is a TypeRef so before this commit `Alias[Int]` was never reduced to `Foo[Int]`. It should have been: case stripped: TypeRef if stripped.symbol.is(BaseTypeArg) => true But even this is incorrect: it assumes that we can always safely reduce HK applications involving base class parameters, this is not the case when the parameter kind is different from the rhs kind as illustrated by `i1181c.scala`. We fix this by simply dropping the special case.