File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import Flags._
1414import TypeErasure .{erasure , hasStableErasure }
1515import Mode .ImplicitsEnabled
1616import NameOps ._
17- import NameKinds .LazyImplicitName
17+ import NameKinds .{ LazyImplicitName , EvidenceParamName }
1818import Symbols ._
1919import Denotations ._
2020import Types ._
@@ -1265,7 +1265,8 @@ trait Implicits { self: Typer =>
12651265 def addendum = if (qt1 eq qt) " " else (i " \n which is an alias of: $qt1" )
12661266 em " parameter of ${qual.tpe.widen}$addendum"
12671267 case _ =>
1268- em " parameter ${paramName} of $methodStr"
1268+ em " ${ if paramName.is(EvidenceParamName ) then " an implicit parameter"
1269+ else s " parameter $paramName" } of $methodStr"
12691270 }
12701271
12711272 private def strictEquality (implicit ctx : Context ): Boolean =
Original file line number Diff line number Diff line change 1919-- Error: tests/neg/missing-implicit1.scala:23:42 ----------------------------------------------------------------------
202023 | List(1, 2, 3).traverse(x => Option(x)) // error
2121 | ^
22- |no implicit argument of type testObjectInstance.Zip[Option] was found for parameter evidence$1 of method traverse in trait Traverse
22+ |no implicit argument of type testObjectInstance.Zip[Option] was found for an implicit parameter of method traverse in trait Traverse
2323 |
2424 |The following import might fix the problem:
2525 |
6868-- Error: tests/neg/missing-implicit1.scala:50:42 ----------------------------------------------------------------------
696950 | List(1, 2, 3).traverse(x => Option(x)) // error
7070 | ^
71- |no implicit argument of type Zip[Option] was found for parameter evidence$2 of method traverse in trait Traverse
71+ |no implicit argument of type Zip[Option] was found for an implicit parameter of method traverse in trait Traverse
7272 |
7373 |The following import might fix the problem:
7474 |
You can’t perform that action at this time.
0 commit comments