I have a case class defined as such:
case class StreetSecondary(designator: String, value: Option[String])
I then define an expli
Why would you think you are loosing them?
case class Person(name: String, age: Int)
object Person {
def apply(): Person = new Person("Bob", 33)
}
val alice = Person("Alice", 20)
val bob = Person()
Person.unapply(alice) //Option[(String, Int)] = Some((Alice,20))
Person.unapply(Person()) //Option[(String, Int)] = Some((Bob,33))
Seems like I still got extractors.
In your case you still got it all:
scala> StreetSecondary.unapply _
res10: StreetSecondary => Option[(String, Option[String])] =