Please describe the expected behavior of the issue
It should compile.
Please provide a description of what actually happens
compile error
[error] 25 | val m = mock[Sample]
[error] | ^
[error] | Found: (v : T & Base)
[error] | Required: T² & Base
[error] |
[error] | where: T is a type in method f
[error] | T² is a type variable
[error] |
Reproducible Test Case
trait Base
trait Sample {
def f[T](v: T & Base): Unit
}
object Test extends AsyncFunSuite with AsyncMockFactory {
test("intersection type") {
val m = mock[Sample]
succeed
}
}
Thank you for your work to support scala3!
ScalaMock Version (e.g. 3.5.0)
6.0.0-M2
Scala Version (e.g. 2.12)
3.3.3
Runtime (JVM or JS)
Eclipse Adoptium Java 21.0.2
Please describe the expected behavior of the issue
It should compile.
Please provide a description of what actually happens
compile error
Reproducible Test Case