{"action":"created","issue":{"url":"https://api.github.com/repos/scala-graph/scala-graph/issues/32","labels_url":"https://api.github.com/repos/scala-graph/scala-graph/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/scala-graph/scala-graph/issues/32/comments","events_url":"https://api.github.com/repos/scala-graph/scala-graph/issues/32/events","html_url":"https://github.com/scala-graph/scala-graph/issues/32","id":61510738,"number":32,"title":"graph.nodes.find() --> ambiguous reference to overloaded definition","user":{"login":"colin-scott","id":1466843,"avatar_url":"https://avatars.githubusercontent.com/u/1466843?v=3","gravatar_id":"","url":"https://api.github.com/users/colin-scott","html_url":"https://github.com/colin-scott","followers_url":"https://api.github.com/users/colin-scott/followers","following_url":"https://api.github.com/users/colin-scott/following{/other_user}","gists_url":"https://api.github.com/users/colin-scott/gists{/gist_id}","starred_url":"https://api.github.com/users/colin-scott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colin-scott/subscriptions","organizations_url":"https://api.github.com/users/colin-scott/orgs","repos_url":"https://api.github.com/users/colin-scott/repos","events_url":"https://api.github.com/users/colin-scott/events{/privacy}","received_events_url":"https://api.github.com/users/colin-scott/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-14T08:51:41Z","updated_at":"2015-03-14T09:54:30Z","closed_at":null,"body":"I'm trying to find an inner node in a graph that matches some predicate. Here's my attempt:\r\n\r\n```\r\n   val graph = Graph[MyType, DiEdge]()\r\n   ...\r\n   graph.nodes.find((node: MyType) => true) match {\r\n      case Some(root) => println(\"Yay\")\r\n      case None => println(\"Boo\")\r\n    }\r\n```\r\n\r\nThis produces a compiler error:\r\n\r\n```\r\n[error] both method find in trait IterableLike of type (p: _51.NodeT => Boolean)Option[_57.NodeT]\r\n[error] and  method find in trait TraversableOnce of type (p: scalax.collection.mutable.Graph[MyType,scalax.collection.GraphEdge.DiEdge]#NodeT => Boolean)Option[scalax.collection.mutable.Graph[MyType,scalax.collection.GraphEdge.DiEdge]#NodeT]\r\n[error] match argument types (MyType => Boolean)\r\n```\r\n\r\nAny idea how to get around this?\r\n\r\nThanks!\r\n-Colin"},"comment":{"url":"https://api.github.com/repos/scala-graph/scala-graph/issues/comments/80242524","html_url":"https://github.com/scala-graph/scala-graph/issues/32#issuecomment-80242524","issue_url":"https://api.github.com/repos/scala-graph/scala-graph/issues/32","id":80242524,"user":{"login":"peter-empen","id":1228855,"avatar_url":"https://avatars.githubusercontent.com/u/1228855?v=3","gravatar_id":"","url":"https://api.github.com/users/peter-empen","html_url":"https://github.com/peter-empen","followers_url":"https://api.github.com/users/peter-empen/followers","following_url":"https://api.github.com/users/peter-empen/following{/other_user}","gists_url":"https://api.github.com/users/peter-empen/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-empen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-empen/subscriptions","organizations_url":"https://api.github.com/users/peter-empen/orgs","repos_url":"https://api.github.com/users/peter-empen/repos","events_url":"https://api.github.com/users/peter-empen/events{/privacy}","received_events_url":"https://api.github.com/users/peter-empen/received_events","type":"User","site_admin":false},"created_at":"2015-03-14T09:54:30Z","updated_at":"2015-03-14T09:54:30Z","body":"There is no compiler error on my side but I get \"Boo\":\r\n```scala\r\n  import scalax.collection.Graph\r\n  import scalax.collection.GraphEdge._\r\n  type MyType = Int\r\n  val graph = Graph[MyType, DiEdge]()\r\n  graph.nodes.find((node: MyType) => true) match {\r\n    case Some(root) => println(\"Yay\")\r\n    case None => println(\"Boo\")\r\n  }\r\n```\r\nNote however that when calling find as above an implicit conversion takes place so one possible cause could be that your IDE is not capable to involve this conversion.\r\nColin, please include full runnable code to demonstrait your problem. Also, questions should go to https://groups.google.com/forum/#!forum/scala-graph. Thank you."}}