-
Notifications
You must be signed in to change notification settings - Fork 152
Open
Labels
Description
import enumeratum._
class A {
sealed trait Greeting extends EnumEntry
object Greeting extends Enum[Greeting] {
/*
`findValues` is a protected method that invokes a macro to find all `Greeting` object declarations inside an `Enum`
You use it to implement the `val values` member
*/
val values = findValues
case object Hello extends Greeting
case object GoodBye extends Greeting
case object Hi extends Greeting
case object Bye extends Greeting
}
// Object Greeting has a `withName(name: String)` method
println(Greeting.withName("Hello"))
}
new Athis fails on scala3 while working on scala2
seems to affect all enumeratum versions on scala3 https://scastie.scala-lang.org/OlegYch/1LW50AZVQFS9CKuEGZ8eLw/11