-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implicit resolution regression in 2.13.x #11068
Comments
is it reproducible without outside dependencies? |
The example is updated to remove outside dependencies. |
compile success if swap these @@ -11,12 +11,12 @@
object Regression {
object OptionT extends OptionTInstances0 {
- implicit final def OptionTFunctor[F[_]](implicit F0: Functor[F]): Functor[({type T[A] = OptionT[F, A]})#T] = ???
+ implicit final def OptionTMonadError[F[_]](implicit F0: Monad[F]): MonadError[({type T[A] = OptionT[F, A]})#T, Throwable] = ???
}
sealed abstract class OptionTInstances0 {
- implicit final def OptionTMonadError[F[_]](implicit F0: Monad[F]): MonadError[({type T[A] = OptionT[F, A]})#T, Throwable] = ???
+ implicit final def OptionTFunctor[F[_]](implicit F0: Functor[F]): Functor[({type T[A] = OptionT[F, A]})#T] = ???
} Some libraries encountered the same error (since Scala 2.13.0-M3) |
MonadError is a subtype of Functor therefore this is not a bug but a bug fix! Granted, breaking change hence in 2.13 |
I think I ran into this as well. So I guess that the instance summoned by implicitly[Functor[({type T[A] = OptionT[Future, A]})#T]] will be |
This example doesn't make much sense in practice. E.g. why would we say that Anyway in this example, given that |
Closing since this is working as intended. Let us know if we should reopen. |
The text was updated successfully, but these errors were encountered: