example code fails to compile

5 views
Skip to first unread message

Performant Data LLC

unread,
Mar 8, 2026, 2:01:32 PM (11 days ago) Mar 8
to scala-graph
The example code on https://scala-graph.org/guides/core/editing.html

case class MyDiEdge(source: String, target: String)
    extends AbstractDiEdge(source, target)

implicit final class MyNodeImplicits(val source: String)
    extends AnyVal
    with AbstractDiEdgeImplicits[String, MyDiEdge, MyDiEdge.type] {
  protected def companion = MyDiEdge
}


doesn't compile with Scala 3.8.2. I see the error

    with AbstractDiEdgeImplicits[String, MyDiEdge, MyDiEdge.type] {
                                         ^^^^^^^^
Type argument MyDiEdge does not have the same kind as its bound [N] <: scalax.collection.generic.AnyDiEdge[N]

Performant Data LLC

unread,
Mar 9, 2026, 3:43:13 PM (10 days ago) Mar 9
to scala-graph
The toGraph method used on https://scala-graph.org/guides/core/traversing.html doesn't exist.
Reply all
Reply to author
Forward
0 new messages