-
Notifications
You must be signed in to change notification settings - Fork 162
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
Read scala default values, if no fieldDefaultValue annotation is found #562
Conversation
Any progress? |
@jdegoes I fixed the linting errors |
I test this locally, it failed on generic field. |
@liewhite Can you provide a reproducer and tell me for which Scala version? |
.declaredMethod(s"$$apply$$default$$$i") | ||
.headOption | ||
) | ||
.map(Select(Ref(from.companionModule), _).asExpr) |
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.
Compiling failed on Generic case class here.
case class A[T](a: Option[T], b: Int) derives Schema Compilation failed with I comment in code view |
Thanks. I'll take a look soon. |
if(i.isExpr) {
i.asExpr
}else {
i.appliedToType(TypeRepr.of[Any]).asExpr
} This works. |
@liewhite Finally found some time. Your solution is ok, since when we call @jdegoes I could not use a generic implicit for the test of the generic class. If I do it, the gen macro for Scala 3 fails. But this seems to be a problem that existed before my changes. I'll open a bg ticket. Edit: #580 |
fixes #552
/claim #552