diff options
author | Martin Odersky <odersky@gmail.com> | 2016-06-07 14:17:52 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-11 13:35:02 +0200 |
commit | 5041e9311bf1845d09c6eeccba816214fe25a3e6 (patch) | |
tree | 8e23c358a5a75c8050c848bc477c0990063d3feb | |
parent | 31af865656ecc352c39ce919981e9b50d42a3237 (diff) | |
download | dotty-5041e9311bf1845d09c6eeccba816214fe25a3e6.tar.gz dotty-5041e9311bf1845d09c6eeccba816214fe25a3e6.tar.bz2 dotty-5041e9311bf1845d09c6eeccba816214fe25a3e6.zip |
Make TypeAccumulators follow LazyRefs
TypeMaps do the same, so it is logical, and helps
prevent subtle errors as when we mispredicted whether
a RecType contains references that point to it.
Also, add normalizeHkApply to homogenize
Fixes some discrepancies in Tasty typing.
Also, homogenize skolem types
Skolem types are eliminated by pickling, so they should not appear
in the "before-pickling" output.
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 3 | ||||
-rw-r--r-- | src/dotty/tools/dotc/printing/PlainPrinter.scala | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index d3e97b492..b779cbf3e 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -3708,6 +3708,9 @@ object Types { case tp: JavaArrayType => this(x, tp.elemType) + case tp: LazyRef => + this(x, tp.ref) + case tp: ProtoType => tp.fold(x, this) diff --git a/src/dotty/tools/dotc/printing/PlainPrinter.scala b/src/dotty/tools/dotc/printing/PlainPrinter.scala index 20bf8b407..a9f5b771a 100644 --- a/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -53,6 +53,10 @@ class PlainPrinter(_ctx: Context) extends Printer { case tp @ TypeRef(_, tpnme.hkApplyOBS) => val tp1 = tp.reduceProjection if (tp1 eq tp) tp else homogenize(tp1) + case tp: RefinedType => + tp.normalizeHkApply + case tp: SkolemType => + homogenize(tp.info) case tp: LazyRef => homogenize(tp.ref) case _ => |