Trait instantiation in ambiguous context

Next level: can the code below be fixed to compile, in spite of the ambiguous context?

trait A
trait B(using A)
class C(using A) extends B(using summon[A])
trait E extends B

trait D:
  given a1: A
  given a2: A
  val c = new C(using a1) with E // ambiguous given instances...
1 Like