Open
Description
// if using Scala 2.13.0 then a compile error results in marked line below
// ("found Step[B with A]; required Step[A]")
// if using Dotty then it compiles fine
// after removing the contravariance from Step[E] it compiles also under Scala 2.13
// a Step requires some environment
type Step[-E]
// providing a 'p' allows to transform a step that requires an environment with P into a step that does no more require a P
def provide[E, P](p: P): Step[E with P] => Step[E] = ???
trait A
trait B
val step: Step[A with B] = ???
val b: B = ???
// the compile error occurs here
val s: Step[A] = provide(b)(step)