Skip to content

Commit 03fb30d

Browse files
committed
Workaroound for testOptimized failure.
Need to follow up later on what caused it to fail.
1 parent e199e2d commit 03fb30d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -983,25 +983,25 @@ object Types {
983983
this
984984
}
985985

986-
private def dealias(keepAnnots: Boolean)(implicit ctx: Context): Type = this match {
986+
private def dealias1(keepAnnots: Boolean)(implicit ctx: Context): Type = this match {
987987
case tp: TypeRef =>
988988
if (tp.symbol.isClass) tp
989989
else tp.info match {
990-
case TypeAlias(tp) => tp.dealias(keepAnnots): @tailrec
990+
case TypeAlias(tp) => tp.dealias1(keepAnnots): @tailrec
991991
case _ => tp
992992
}
993993
case app @ AppliedType(tycon, args) =>
994-
val tycon1 = tycon.dealias(keepAnnots)
995-
if (tycon1 ne tycon) app.superType.dealias(keepAnnots): @tailrec
994+
val tycon1 = tycon.dealias1(keepAnnots)
995+
if (tycon1 ne tycon) app.superType.dealias1(keepAnnots): @tailrec
996996
else this
997997
case tp: TypeVar =>
998998
val tp1 = tp.instanceOpt
999-
if (tp1.exists) tp1.dealias(keepAnnots): @tailrec else tp
999+
if (tp1.exists) tp1.dealias1(keepAnnots): @tailrec else tp
10001000
case tp: AnnotatedType =>
1001-
val tp1 = tp.tpe.dealias(keepAnnots)
1001+
val tp1 = tp.tpe.dealias1(keepAnnots)
10021002
if (keepAnnots) tp.derivedAnnotatedType(tp1, tp.annot) else tp1
10031003
case tp: LazyRef =>
1004-
tp.ref.dealias(keepAnnots): @tailrec
1004+
tp.ref.dealias1(keepAnnots): @tailrec
10051005
case _ => this
10061006
}
10071007

@@ -1010,14 +1010,14 @@ object Types {
10101010
* Goes through annotated types and rewraps annotations on the result.
10111011
*/
10121012
final def dealiasKeepAnnots(implicit ctx: Context): Type =
1013-
dealias(keepAnnots = true)
1013+
dealias1(keepAnnots = true)
10141014

10151015
/** Follow aliases and dereferences LazyRefs, annotated types and instantiated
10161016
* TypeVars until type is no longer alias type, annotated type, LazyRef,
10171017
* or instantiated type variable.
10181018
*/
10191019
final def dealias(implicit ctx: Context): Type =
1020-
dealias(keepAnnots = false)
1020+
dealias1(keepAnnots = false)
10211021

10221022
/** Perform successive widenings and dealiasings until none can be applied anymore */
10231023
@tailrec final def widenDealias(implicit ctx: Context): Type = {

0 commit comments

Comments
 (0)