Skip to content

Commit 01d8dfb

Browse files
committed
Cleanups
1 parent 2270899 commit 01d8dfb

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
505505
case _: DivergingImplicit => "Diverging Implicit"
506506
case _: ShadowedImplicit => "Shadowed Implicit"
507507
case result: AmbiguousImplicits =>
508-
"Ambiguous Implicit: " ~ toText(result.alt1) ~ " and " ~ toText(result.alt2)
508+
"Ambiguous Implicit: " ~ toText(result.alt1.ref) ~ " and " ~ toText(result.alt2.ref)
509509
case _ =>
510510
"?Unknown Implicit Result?" + result.getClass
511511
}

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,9 +1195,6 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
11951195
if (winsType2) -1 else 0
11961196
}}
11971197

1198-
def isAsGood(alt1: TermRef, alt2: TermRef, nesting1: Int = 0, nesting2: Int = 0)(implicit ctx: Context): Boolean =
1199-
compare(alt1, alt2, nesting1, nesting2) >= 0
1200-
12011198
def narrowMostSpecific(alts: List[TermRef])(implicit ctx: Context): List[TermRef] = track("narrowMostSpecific") {
12021199
alts match {
12031200
case Nil => alts

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import reporting.diagnostic.{Message, MessageContainer}
3030
import Inferencing.fullyDefinedType
3131
import Trees._
3232
import Hashable._
33-
import util.{Property, PriorityGraph}
33+
import util.Property
3434
import config.Config
3535
import config.Printers.{implicits, implicitsDetailed, typr}
3636
import collection.mutable

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2267,7 +2267,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
22672267
case SearchSuccess(inferred, _, _) =>
22682268
adapt(inferred, pt)(ctx.retractMode(Mode.ImplicitsEnabled))
22692269
case failure: SearchFailure =>
2270-
if (pt.isInstanceOf[ProtoType] && !failure.reason.isInstanceOf[AmbiguousImplicits])
2270+
if (pt.isInstanceOf[ProtoType] && !failure.isAmbiguous)
22712271
// don't report the failure but return the tree unchanged. This
22722272
// will cause a failure at the next level out, which usually gives
22732273
// a better error message.

0 commit comments

Comments
 (0)