-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Backport #5384 - Support of generic case class for the JSON macros #6435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| case NoSymbol => c.abort(c.enclosingPosition, "No apply function found") | ||
| case s => s.asTerm.alternatives | ||
| case s => s.asTerm.alternatives.filter { | ||
| _.asMethod.paramLists.size == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the restriction?
|
This change broke serialization of case classes with multiple arguments list, is it intended? |
|
I don't see how it can break the JSON serialization, as such classes were just not supported before (compilation error), while the API is unchanged. |
|
it was working before http://scastie.org/21867 |
|
Writes could have "accidentally" worked with such multi parameters constructors, even if never documented, but the |
|
i'm just pointing out that 2.5.5 is no longer compatible with 2.5.4 |
|
It's binary and API compatible, and also fixes macro incoherencies about an undocumented/not recommanded case. Not it can be said to "break", but it can be documented now. |
|
i've created an issue #6476 as it is very clearly a breaking change for us |
|
I understand that the restrictions described previously in this thread applies for more than one parameter lists. But I'm also getting the 'No apply function found matching unapply parameters' message when I have a generic case class more than 1 generic parameters in the same param list. Like so: case class Interval[T](base: T, tolerance: Option[T])
implicit val intFmt: Format[Interval[Int]] = Json.format[Interval[Int]]I would expect that to work, or? |
|
ah...ok. Thanks @cchantep. |
No description provided.