Scala implicit return problem
Using Scala "2.10.4" I have an implicit definition like this:
implicit class MyImplicits(val s: S) {
def ==>(relation: W):Option[List[S]] = {
getRelation(s,relation)
}
}
when i want to use it, after fine works:
import MyImplicits
val list1 = s ==>(w)
val value = list1.get
But when I write this, I get the error:
import MyImplicits
val value = s ==>(w).get
Error:(56, 67) value get is not a member of MyImplicits
val value = s ==>(w).get
^
What is the reason for this error and still solve it?
+3
source to share