Skip to content

Commit d1100ed

Browse files
committed
Fix rebase breakage
1 parent 7c8a75d commit d1100ed

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

compiler/src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
213213
ta.assignType(untpd.TypeDef(sym.name, TypeTree(sym.info)), sym)
214214

215215
def ClassDef(cls: ClassSymbol, constr: DefDef, body: List[Tree], superArgs: List[Tree] = Nil)(implicit ctx: Context): TypeDef = {
216-
val firstParentRef :: otherParentRefs = cls.info.parentRefs
216+
val firstParentRef :: otherParentRefs = cls.info.parentRefs // @!!! adapt
217217
val firstParent = cls.appliedRef.baseTypeWithArgs(firstParentRef.symbol)
218218
val superRef =
219219
if (cls is Trait) TypeTree(firstParent)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
3939
else pre match {
4040
case pre: SuperType => toPrefix(pre.thistpe, cls, thiscls)
4141
case _ =>
42-
if (thiscls.derivesFrom(cls) && pre.baseTypeRef(thiscls).exists)
42+
if (thiscls.derivesFrom(cls) && pre.baseType(thiscls).exists)
4343
if (variance <= 0 && !isLegalPrefix(pre)) range(pre.bottomType, pre)
4444
else pre
4545
else if ((pre.termSymbol is Package) && !(thiscls is Package))
@@ -60,7 +60,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
6060
if (tparams.head.eq(tparam))
6161
return args.head match {
6262
case bounds: TypeBounds =>
63-
val v = currentVariance
63+
val v = variance
6464
if (v > 0) bounds.hi
6565
else if (v < 0) bounds.lo
6666
else TypeArgRef(pre, cls.typeRef, idx)
@@ -298,7 +298,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
298298
* all (possibly applied) references to classes.
299299
*/
300300
def normalizeToClassRefs(parents: List[Type], cls: ClassSymbol, decls: Scope): List[Type] = {
301-
if (Config.newScheme) return parents.mapConserve(_.dealias)
301+
if (Config.newScheme) return parents.mapConserve(_.dealias) // !@@@ track and eliminate usages?
302302
// println(s"normalizing $parents of $cls in ${cls.owner}") // !!! DEBUG
303303

304304
// A map consolidating all refinements arising from parent type parameters

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4044,12 +4044,12 @@ object Types {
40444044
abstract class DeepTypeMap(implicit ctx: Context) extends TypeMap {
40454045
override def mapClassInfo(tp: ClassInfo) = {
40464046
val prefix1 = this(tp.prefix)
4047-
val parentRefs1 = (tp.parentRefs mapConserve this).asInstanceOf[List[TypeRef]]
4047+
val parents1 = tp.parentsNEW mapConserve this
40484048
val selfInfo1 = tp.selfInfo match {
40494049
case selfInfo: Type => this(selfInfo)
40504050
case selfInfo => selfInfo
40514051
}
4052-
tp.derivedClassInfo(prefix1, parentRefs1, tp.decls, selfInfo1)
4052+
tp.derivedClassInfo(prefix1, parents1, tp.decls, selfInfo1)
40534053
}
40544054
}
40554055

@@ -4280,7 +4280,7 @@ object Types {
42804280
if (prefix.exists) tp.derivedTypeArgRef(prefix)
42814281
else {
42824282
val paramBounds = tp.underlying
4283-
approx(paramBounds.loBound, paramBounds.hiBound)
4283+
range(paramBounds.loBound, paramBounds.hiBound)
42844284
}
42854285

42864286
override protected def derivedAnnotatedType(tp: AnnotatedType, underlying: Type, annot: Annotation) =

0 commit comments

Comments
 (0)