Skip to content

Commit f161678

Browse files
committed
Quick cleanup
1 parent 76957d1 commit f161678

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
201201
}
202202

203203
/** The minimal set of classes in `cs` which derive all other classes in `cs` */
204-
@tailrec def dominators(cs: List[ClassSymbol], accu: List[ClassSymbol]): List[ClassSymbol] = cs match {
204+
def dominators(cs: List[ClassSymbol], accu: List[ClassSymbol]): List[ClassSymbol] = (cs: @unchecked) match {
205205
case c :: rest =>
206206
val accu1 = if (accu exists (_ derivesFrom c)) accu else c :: accu
207207
if (cs == c.baseClasses) accu1 else dominators(rest, accu1)

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
658658
val cond1 = typed(tree.cond, defn.BooleanType)
659659
val thenp1 = typed(tree.thenp, pt.notApplied)
660660
val elsep1 = typed(tree.elsep orElse (untpd.unitLiteral withPos tree.pos), pt.notApplied)
661-
if (thenp1.tpe.isPhantom ^ elsep1.tpe.isPhantom)
661+
if (thenp1.tpe.isPhantom != elsep1.tpe.isPhantom)
662662
ctx.error(IfElsePhantom(), tree.pos)
663663
val thenp2 :: elsep2 :: Nil = harmonize(thenp1 :: elsep1 :: Nil)
664664
assignType(cpy.If(tree)(cond1, thenp2, elsep2), thenp2, elsep2)
@@ -1662,7 +1662,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
16621662
def typedType(tree: untpd.Tree, pt: Type = WildcardType)(implicit ctx: Context): Tree = {
16631663
// todo: retract mode between Type and Pattern?
16641664

1665-
/** Check that the are not mixed Any/Phantom.Any types in `&`, `|` and type bounds,
1665+
/** Check that there are not mixed Any/Phantom.Any types in `&`, `|` and type bounds,
16661666
* this includes Phantom.Any of different universes.
16671667
*/
16681668
def checkedTops(tree: untpd.Tree): Set[Type] = {

0 commit comments

Comments
 (0)