amnaredo / test

0 stars 0 forks source link

Case objects unsupported #45

Open amnaredo opened 3 years ago

amnaredo commented 3 years ago

uPickle cannot deal with case objects as shown in the following code:

trait Type
object Type {
  case object A extends Type
  case object B extends Type
}

upickle.read[Type]("") // Error: uPickle does not know how to read [Type]s; define an implicit Reader[Type] to teach it how

Edit: When the trait is sealed, the above compiles without problems. Could the macro issue an error in such cases?

ID: 57 Original Author: tindzk