I have an enumeration that I want to use in pattern matches as an actor. I do not get what I expect, and now I suspect that I am missing something simple.
My listing
object Ops extends Enumeration {
val Create = Value("create")
val Delete = Value("delete")
}
Then I create Ops from the line:
val op = Ops.valueOf("create")
Inside my match I have:
case (Ops.Create, ...)
But Ops.Create is not like ops.valueOf ("create")
The first is just the "creation" of the atom, and later, Some (create)
I hope this is enough for someone to tell me that I am missing ...
thank
source
share