-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add Symbol.isSuperAccessor to reflection API #13388
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
ba10f81
to
d8ebb13
Compare
@@ -249,7 +249,7 @@ trait ClassLikeSupport: | |||
extension (c: ClassDef) | |||
def extractMembers: Seq[Member] = { | |||
val inherited = c.getNonTrivialInheritedMemberTrees.collect { | |||
case dd: DefDef if !dd.symbol.isClassConstructor && !(dd.symbol.isSuperBridgeMethod || dd.symbol.isDefaultHelperMethod) => dd | |||
case dd: DefDef if !dd.symbol.isClassConstructor && !(dd.symbol.isSuperAccessor || dd.symbol.isDefaultHelperMethod) => dd |
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.
Alternatively, we could make sure to set the Artifact flag (which doesn't do anything at runtime but is used to signal to javac that this method should not be called from user code) on super accessors, default getters, etc.
0f48753
to
6e38791
Compare
Needs tests |
Part of #13371 |
6e38791
to
d6d898f
Compare
Rebased on master |
97c1284
to
eeb57ca
Compare
eeb57ca
to
593bb74
Compare
Rebased on master |
I think my suggestion from #13388 (comment) is still the way to go, unless there's a good reason to specifically care about super accessors from reflection? |
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.
@pikinier20 could you try the alternative solution that does not require this addition?
@nicolasstucki Do you think it's worth to add such method to API? |
I think it is worth it even if there is another if later we manage to also do this via flags. We will still have code generated before the addition of the flag that will need to fall back to this check. @pikinier20 you can remove the MiMa filters as they are not needed anymore. Instead you have to run locally |
593bb74
to
bfbdd6f
Compare
What's the current status with this. Are you still waiting on a review @pikinier20? @nicolasstucki is this something you can return back to to review? |
I think we should rebase this and merge it. It looks good to me. |
bfbdd6f
to
4971581
Compare
No description provided.