Open
Description
Minimized code
trait Foo[+A] {
def foo[B](implicit ev: A <:< Foo[B], s: Int = 0) = ???
def bar(a: Foo[Foo[Int]]) = a.foo
}
Output
[error] 54 | def bar(a: Foo[Foo[Int]]) = a.foo
[error] | ^
[error] |no implicit argument of type Int was found for parameter s of method foo in trait Foo
Expectation
My expectation is to compile.
I have experienced the issue on Scala 3.0.0-M1.
It compiles successfully on Scala 2.
It seems to work if foo
is called with type parameter, i.e. a.foo[Int]
but it still fails if the default parameter would be Set[B] = Set.empty
instead of Int
.