summaryrefslogtreecommitdiff
path: root/src/manual
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-08-27 11:40:28 +0200
committerJason Zaugg <jzaugg@gmail.com>2013-08-27 16:26:16 +0200
commit3eebc99432075fdffabf8859df3dc8b2ded8df9c (patch)
tree0b4f4413976a999f1cff1cbe28f0486693f74fa7 /src/manual
parentb67fecd0f178ea70e4fa9823c408e52437426403 (diff)
downloadscala-3eebc99432075fdffabf8859df3dc8b2ded8df9c.tar.gz
scala-3eebc99432075fdffabf8859df3dc8b2ded8df9c.tar.bz2
scala-3eebc99432075fdffabf8859df3dc8b2ded8df9c.zip
SI-7785 Preserve TypeVar suspension through TypeMaps
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
Diffstat (limited to 'src/manual')
0 files changed, 0 insertions, 0 deletions