diff options
author | Martin Odersky <odersky@gmail.com> | 2016-06-03 18:42:23 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-11 13:35:00 +0200 |
commit | d0f82a50bffc059803b56a341c8fcd9a238431f7 (patch) | |
tree | 45eff785aa49e2dc6c75bc68656e435f9742608d /src/dotty/tools | |
parent | a7d61c0ffc99c52109937c899c789ad9ea5d6a5b (diff) | |
download | dotty-d0f82a50bffc059803b56a341c8fcd9a238431f7.tar.gz dotty-d0f82a50bffc059803b56a341c8fcd9a238431f7.tar.bz2 dotty-d0f82a50bffc059803b56a341c8fcd9a238431f7.zip |
Don't map info of SkolemTypes in type maps
Mapping the info may create new skolems which undermines
the idea of a skolem as a fixed reference. In a sense, SkolemTypes
are like Termrefs, mapping them does not map their info either.
Creating new skolems on the fly in type maps caused some hard find
to infinite loops under the new hk scheme.
Diffstat (limited to 'src/dotty/tools')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index e4132bf4d..4f5bec56b 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -3333,8 +3333,6 @@ object Types { tp.derivedSuperType(thistp, supertp) protected def derivedAndOrType(tp: AndOrType, tp1: Type, tp2: Type): Type = tp.derivedAndOrType(tp1, tp2) - protected def derivedSkolemType(tp: SkolemType, info: Type): Type = - tp.derivedSkolemType(info) protected def derivedAnnotatedType(tp: AnnotatedType, underlying: Type, annot: Annotation): Type = tp.derivedAnnotatedType(underlying, annot) protected def derivedWildcardType(tp: WildcardType, bounds: Type): Type = @@ -3419,7 +3417,7 @@ object Types { derivedAndOrType(tp, this(tp.tp1), this(tp.tp2)) case tp: SkolemType => - derivedSkolemType(tp, this(tp.info)) + tp case tp @ AnnotatedType(underlying, annot) => val underlying1 = this(underlying) @@ -3522,9 +3520,6 @@ object Types { if (tp1.exists && tp2.exists) tp.derivedAndOrType(tp1, tp2) else if (tp.isAnd) approx(hi = tp1 & tp2) // if one of tp1d, tp2d exists, it is the result of tp1d & tp2d else approx(lo = tp1 & tp2) - override protected def derivedSkolemType(tp: SkolemType, info: Type) = - if (info.exists) tp.derivedSkolemType(info) - else NoType override protected def derivedAnnotatedType(tp: AnnotatedType, underlying: Type, annot: Annotation) = if (underlying.exists) tp.derivedAnnotatedType(underlying, annot) else NoType |