Closed
Description
Based on Open CB #2105
Compiler version
Works in 3.1.1
Fails since 3.1.2
Fails in 3.2.0-RC3
Minimized code
sealed trait Domain[E]
final def splitBounds[E, D[X] <: Domain[X]](
bounds: Seq[E],
)( using domain: D[E]): Seq[E] =
val newBounds: Seq[E] = ???
splitBounds(newBounds) // does not compile
splitBounds[E,D](newBounds) // does compile
Output
[error] ./test.scala:7:29: no given instance of type D[E] was found for parameter domain of method splitBounds
[error]
[error] where: D is a type variable with constraint <: Domain
[error] splitBounds(newBounds) // does not compile
[error]
Expectation
Should compile by resuing implicit Domain parameter