Closed
Description
E.g.:
trait A
trait B
object Test {
val x: (implicit A => Int) & (implicit B => Int) = 42
// error: found: 42, required: (implicit A => Int) & (implicit B => Int)
}
We probably should treat this as an implicit function type, otherwise distributing an intersection (something that the compiler will do in some situations) would change the semantics. But then should we allow this too ?
trait A
trait Foo extends ImplicitFunction[A, Int]
object Test {
val x: Foo = 42
}
@odersky WDYT ?