Open
Description
Compiler version
3.3.5, 3.6.3
Minimized code
trait TCl[A]
trait TCl2[A]
type Ctx
given [R]: TCl[R & Ctx] = null
//given [R]: TCl2[R & Ctx] = null // compiles ok when this line is uncommented
def lol[A: TCl: TCl2](foo: Unit = ()): Any = () // default argument is important (without it it doesn't reproduce)
lol[Int & Ctx]()
Output
Compiler error:
Found: Playground.TCl[R & Ctx]
Required: Playground.TCl[Int & Ctx]
Expectation
Compiler error:
No given instance of type TCl2[Int & Ctx] was found
Scastie:
https://scastie.scala-lang.org/road21/dFsqemp3TWSVfNYn8JDk3A/1