You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since somebody else had the same problem, I am now opening this ticket. I guess lots of users who are now starting to use scala 3 will run into this problem.
Expected behaviour
If play-json currently does not support scala 3 enums via Json.writes, it should tell the user that in a compiler message.
Actual behaviour
If Json.writes[T] is used on a scala 3 enum, compiling it with scala-cli or sbt crashes the compilation process. Compilation can only be killed via the task manager.
How to reproduce (tested on Java 11):
//>usingscala3.3.3//>usingdeporg.playframework::play-json:3.0.2importplay.api.libs.json.*enumColor:case red,green,blue
@main
defmain=implicitvalmyWrites:OWrites[Color] =Json.writes[Color] //this line produces the crash
The text was updated successfully, but these errors were encountered:
nemoo
changed the title
Json.writes[myScala3Enum] crashes play-json / the compiler?
Json.writes[myScala3Enum] crashes play-json / the compilation?
Apr 29, 2024
Since somebody else had the same problem, I am now opening this ticket. I guess lots of users who are now starting to use scala 3 will run into this problem.
Expected behaviour
If play-json currently does not support scala 3 enums via Json.writes, it should tell the user that in a compiler message.
Actual behaviour
If Json.writes[T] is used on a scala 3 enum, compiling it with scala-cli or sbt crashes the compilation process. Compilation can only be killed via the task manager.
How to reproduce (tested on Java 11):
The text was updated successfully, but these errors were encountered: