aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Implicits.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/typer/Implicits.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Implicits.scala4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/typer/Implicits.scala b/src/dotty/tools/dotc/typer/Implicits.scala
index 091bf49f9..f7823b2b3 100644
--- a/src/dotty/tools/dotc/typer/Implicits.scala
+++ b/src/dotty/tools/dotc/typer/Implicits.scala
@@ -477,9 +477,7 @@ trait Implicits { self: Typer =>
def assumedCanEqual = ltp.isError || rtp.isError || ltp <:< rtp || rtp <:< ltp
if (!ctx.isAfterTyper && !assumedCanEqual) {
val res = inferImplicitArg(
- defn.EqType.appliedTo(ltp, rtp),
- _ => ctx.error(d"Values of types $ltp and $rtp cannot be compared with == or !=", pos),
- pos)
+ defn.EqType.appliedTo(ltp, rtp), msgFun => ctx.error(msgFun(""), pos), pos)
implicits.println(i"Eq witness found: $res: ${res.tpe}")
}
}