summaryrefslogtreecommitdiff
path: root/test/files/pos/t7785.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-7785 Preserve TypeVar suspension through TypeMapsJason Zaugg2013-08-271-0/+34
During `findMember`, TypeVars in `this` are placed into suspended animation. This is to avoid running into recursive types when matching members to those in base classes. However, the mechanism used to do this is superficial, and doesn't work when TypeVars are copied by TypeMaps. This seems to crop up when using `AppliedTypeVar` with higher-kinded type vars. In the enclosed test case, the cyclic type led to a SOE in CommonOwnerMap. This commit allows a TypeVar to delegate its `suspended` attribute to the TypeVar from which it was copied. This is done in `TypeVar#applyArgs`, which is called by: // TypeMap#mapOver case tv@TypeVar(_, constr) => if (constr.instValid) this(constr.inst) else tv.applyArgs(mapOverArgs(tv.typeArgs, tv.params)) We should review the other places this is called to make sure that it make sense to link in this way: Types#appliedType TypeVar#normalize