-
Notifications
You must be signed in to change notification settings - Fork 530
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
Inconsistency in handling of case classes with private vals #968
Comments
I also think it's related to #768, specifically the logic of shapeless/core/src/main/scala/shapeless/generic.scala Lines 809 to 815 in ab5a1a6
Some background:
But in the case of synthetic accessor methods, the names are different. |
Actually it happens even earlier:
/** Sorts the symbols included in this scope so that:
* 1) Symbols appear in the linearization order of their owners.
* 2) Symbols with the same owner appear in same order of their declarations.
* 3) Synthetic members (e.g. getters/setters for vals/vars) might appear in arbitrary order.
*/
def sorted: List[Symbol] |
This is related to #768 but the problem is different. Suppose we have some case classes:
We get
LabelledGeneric
instances for all but the last:The generalisation seems to be that if the first member is private, and there is another member with a different type, the instance isn't available. The same pattern holds for
Generic
.This inconsistency was showing up in Circe's
semiauto
derivation and was reported by @ohze there.The text was updated successfully, but these errors were encountered: