Skip to content

Commit 8e7a685

Browse files
committed
move implementation of baseClasses into FlexibleType
1 parent 1fb60db commit 8e7a685

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

compiler/src/dotty/tools/dotc/core/TypeOps.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ object TypeOps:
5252
Stats.record("asSeenFrom skolem prefix required")
5353
case _ =>
5454
}
55-
55+
5656
new AsSeenFromMap(pre, cls).apply(tp)
5757
}
5858

@@ -237,7 +237,6 @@ object TypeOps:
237237
if tp1.isBottomType && (tp1 frozen_<:< tp2) then orBaseClasses(tp2)
238238
else if tp2.isBottomType && (tp2 frozen_<:< tp1) then orBaseClasses(tp1)
239239
else intersect(orBaseClasses(tp1), orBaseClasses(tp2))
240-
case FlexibleType(tp1) => orBaseClasses(tp1)
241240
case _ => tp.baseClasses
242241

243242
/** The minimal set of classes in `cs` which derive all other classes in `cs` */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3382,7 +3382,7 @@ object Types {
33823382
if this.tp eq under then this else FlexibleType(under)
33833383
override def computeHash(bs: Binders): Int = doHash(bs, tp)
33843384
override def toString = "FlexibleType(%s)".format(tp)
3385-
//override def hash = NotCached
3385+
override final def baseClasses(using Context): List[ClassSymbol] = underlying.baseClasses
33863386
}
33873387

33883388
// --- AndType/OrType ---------------------------------------------------------------

0 commit comments

Comments
 (0)