We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da45f83 commit 99ec85eCopy full SHA for 99ec85e
README.md
@@ -42,6 +42,14 @@ object Greeting extends Enum[Greeting] {
42
43
}
44
45
+// Object Greeting has a `withName(name: String)` method
46
+Greeting.withName("Hello")
47
+
48
+// => res0: Greeting = Hello
49
50
+Greeting.withName("Haro")
51
+// => java.lang.IllegalArgumentException: Haro is not a member of Enum Greeting$@7d6b560b
52
53
import Greeting._
54
55
def tryMatching(v: Greeting): Unit = v match {
0 commit comments