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
There seems to be an issue when using Macro.anns on case class parameters that are Java types on JDK17+ (works fine on JDK11). I created a small reproduction via scatsie here.
The fix to the issue is quite straightforward, and it's to add the following condition to the filterAnnotation method: a.tpe.typeSymbol.owner.fullName != "jdk.internal". Please let me know if you'd like me to create a PR for it and I'll do so
Please note that AFAICT, Macro.paramAnns works as intended, although I thought to let you know since the fix is relatively simple and there might be edge cases where a user will want to extract the param annotations manually as in the repro above
The text was updated successfully, but these errors were encountered:
kyri-petrou
changed the title
[Scala 3] Macro.anns throws when used on parameters with Java types on JDK17+
[Scala 3] Macro.anns throws IllegalAccessError when used on parameters with Java types on JDK17+
Oct 21, 2023
Hi there 👋
There seems to be an issue when using
Macro.anns
on case class parameters that are Java types on JDK17+ (works fine on JDK11). I created a small reproduction via scatsie here.The fix to the issue is quite straightforward, and it's to add the following condition to the
filterAnnotation
method:a.tpe.typeSymbol.owner.fullName != "jdk.internal"
. Please let me know if you'd like me to create a PR for it and I'll do soPlease note that AFAICT,
Macro.paramAnns
works as intended, although I thought to let you know since the fix is relatively simple and there might be edge cases where a user will want to extract the param annotations manually as in the repro aboveThe text was updated successfully, but these errors were encountered: