Diverging Implicit error in compact tree mode (without specifying `Vimplicits-verbose-tree`) reports some errors as "unlinked", while in reality they are just compacted #88
object DivergingImplicits {
type C
type D
object Diverging {
trait ::[A, B]
implicit def f[A, B](
implicit
ii: Int :: A :: B
): A :: B = ???
implicit def g[A, B]: Int :: Int :: Int :: A :: B = ???
implicitly[C :: D]
}
}
If we invoke splain without the Vimplicits-verbose-tree option, it will throw the following error:
newSource1.scala:16: error: implicit error;
!I e: DivergingImplicits.C :: DivergingImplicits.D
Diverging.f invalid because
!I ii: scala.Int :: DivergingImplicits.C :: DivergingImplicits.D
⋮
――Diverging.f invalid because
!I ii:
scala.Int ::
scala.Int ::
scala.Int ::
DivergingImplicits.C ::
DivergingImplicits.D
diverging implicit expansion for type (scala.Int :: scala.Int :: scala.Int :: DivergingImplicits.C :: DivergingImplicits.D)
starting with method g in object Diverging
[WARNING] The following reported error(s) cannot be linked to any part of the implicit search tree:
――diverging implicit expansion for type (scala.Int :: scala.Int :: DivergingImplicits.C :: DivergingImplicits.D)
starting with method f in object Diverging
implicitly[C :: D]
^
The last part, starting from [WARNING] should totally be removed, as this is the error omitted in the ⋮ section.
In the following unit test:
If we invoke splain without the
Vimplicits-verbose-tree
option, it will throw the following error:The last part, starting from [WARNING] should totally be removed, as this is the error omitted in the ⋮ section.