type inference not working for .toOuter; Scala 3, scala-graph 1.13.2

26 views
Skip to first unread message

Simon Leischnig

unread,
Jan 16, 2022, 8:52:23 AM1/16/22
to scala-graph
Hi, 
I was giving scala-graph a go with a Scala 3 project. I try to reproduce the example given in http://www.scala-graph.org/guides/core-inner-outer.html . However, in line 3, there is unexpected behavior, I think:

```
  1. val g = Graph(1~2) // Graph[Int,UnDiEdge](1, 2, 1~2)
  2. val n1 = g.nodes.head // g.NodeT = 1 or 2
  3. n1.toOuter // Int = 1 or 2 <--- not so: the type of n1 is inferred to `N`; the following line fails type check.
  4. val n1o: Int = n1.toOuter // fails
```
Any suggestions on how to proceed?
Thanks,
Simon L.

Simon Leischnig

unread,
Jan 16, 2022, 8:53:46 AM1/16/22
to scala-graph
PS: I am also posting this here: https://github.com/scala-graph/scala-graph/issues/217

empen...@gmail.com

unread,
Jan 30, 2022, 4:55:19 AM1/30/22
to scala-graph
Reply all
Reply to author
Forward
0 new messages