The main reason for this is that the compiler can’t tell whether a type variable will be used in an intersection or not.
Discription

It’s possible to make it work, but it would require some kind of annotation on the type variables. I’m not sure if there are other reasons why this doesn’t work out-of-the-box, but I think it’s worth exploring what could be done about that.

I have been working with Scala for quite some time now and one thing that has always bothered me is how implicits are handled by the compiler
https://t.co/8ApdvCqMLb

Back to Main

Subscribe for the latest news: