-
-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Description
Add support for SIP-23 - Literal-based singleton types
play-json 3.0.4
JDK 17
Reproducible Test Case
package play.api.libs.json
object TestSingletonTypes {
case class CaseClassWithSingleton(
singleton: "singleton"
)
object CaseClassWithSingleton {
implicit val format: Format[CaseClassWithSingleton] = Json.format[CaseClassWithSingleton]
}
}Result
Fails to compile with:
[error] -- Error: /Users/mpichette/src/git/oss/play-json/play-json/shared/src/test/scala-3/play/api/libs/json/TestSingletonTypes.scala:13:60
[error] 13 | implicit val format: Format[CaseClassWithSingleton] = Json.format[CaseClassWithSingleton]
[error] | ^^^^^^^^^^^^^^^^^^^^^^^^^^
[error] | Instance not found: play.api.libs.json.Reads[String]
Metadata
Metadata
Assignees
Labels
No labels