Closed
Description
Example:
trait Tc1[A]
trait Tc2[A]
class X
object X {
implicit def catchAll[F[_]]: F[X] = ???
}
type ManualLambda[a] = Tc1[a] & Tc2[a]
object app extends App {
implicitly[Tc1[X]] //ok
implicitly[ManualLambda[X]] // ok
implicitly[Tc1[X] & Tc2[X]] // no implicit argument of type Tc1[X] & Tc2[X] was found for parameter ev of method implicitly in object DottyPredef
}
Expected:
catchAll
should make nearly all implicit searches succeed for X
(Scala 2 behavior)
Actual:
search for Tc1[X] & Tc2[X]
fails with
no implicit argument of type Tc1[X] & Tc2[X] was found for parameter ev of method implicitly in object DottyPredef
Note that catchAll
is not mentioned in the error as it was not considered, meanwhile search for ManualLambda
succeeds. Seems like dotty doesn't create the equivalent of ManualLambda
to fill F
parameter currently
Metadata
Metadata
Assignees
Labels
No labels