-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
minimized code
In Scala 2 following code works just fine:
class IO[+A]
trait Functor[F[_]]
trait Monad[F[_]] extends Functor[F]
class Stream[+F[_], +A] {
def take[F1[x] >: F[x]](n: Int)(implicit f: Functor[F1]): Stream[F1, A] = {
this
}
}
implicit val ioMonad: Monad[IO] = null
new Stream[IO, Int].take[IO](10)However, the same code in Dotty results in:
Type argument mains.Test.IO does not conform to lower bound my.package.IO
expectation
Expect the same behavior as in Scala 2.