Skip to content

Commit 5041e93

Browse files
committed
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.
1 parent 31af865 commit 5041e93

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/dotty/tools/dotc/core/Types.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3708,6 +3708,9 @@ object Types {
37083708
case tp: JavaArrayType =>
37093709
this(x, tp.elemType)
37103710

3711+
case tp: LazyRef =>
3712+
this(x, tp.ref)
3713+
37113714
case tp: ProtoType =>
37123715
tp.fold(x, this)
37133716

src/dotty/tools/dotc/printing/PlainPrinter.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ class PlainPrinter(_ctx: Context) extends Printer {
5353
case tp @ TypeRef(_, tpnme.hkApplyOBS) =>
5454
val tp1 = tp.reduceProjection
5555
if (tp1 eq tp) tp else homogenize(tp1)
56+
case tp: RefinedType =>
57+
tp.normalizeHkApply
58+
case tp: SkolemType =>
59+
homogenize(tp.info)
5660
case tp: LazyRef =>
5761
homogenize(tp.ref)
5862
case _ =>

0 commit comments

Comments
 (0)