There is a compilation error when I try to mock a class with overloaded methods that have arguments of a generic type parametrised with a wildcard type.
Example:
class P[T]
class A[F[_]]
class B[F[_]]
trait Fooer[F[_]] {
def foo(x: A[F]): Unit
def foo(x: B[F]): Unit
}
val mockFooer: Fooer[P] = mock[Fooer[P]]
(mockFooer.foo(_: A[P])).expects(new A[P])
(mockFooer.foo(_: B[P])).expects(new B[P])
Errors:
value expects is not a member of this.A[this.P] => Unit
(mockFooer.foo(_: A[P])).expects(new A[P])
value expects is not a member of this.B[this.P] => Unit
(mockFooer.foo(_: B[P])).expects(new B[P])
There is a compilation error when I try to mock a class with overloaded methods that have arguments of a generic type parametrised with a wildcard type.
Example:
Errors:
However, I expect successful compilation.
Versions: