Repository navigation
Conversation
|
👋 Welcome back dbalek! A progress list of the required criteria for merging this PR into |
|
@dbalek This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@PaulSandoz) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Consider the following code snippet:
When accessing the
testmethod’s code model from an annotation processor viaOp.ofElement(...), the following error is thrown:Op.ofElementcallsAttr.runWithAttributedMethod, which passes the original method body toDeferredAttr.attribSpeculative. The anonymous class is entered asTest$1. Attributing its superclass recursively attributes its owners, eventually attributing entireTestclass. The same anonymous class AST is then entered again asTest$2, overwritingtree.sym. The original attribution resumes withc == Test$1, buttree.sym == Test$2, causing the assertion inAttr.attribClassBodyto fail.The proposed solution is to replace the single method attribution performed by
Attr.runWithAttributedMethodwith a call toattribClass(env.enclClass.sym), thereby attributing the entire enclosing class. This should prevent recursive re-entry and the resulting instability in anonymous class numbering. A similar approach is already used byJavacTrees.getElement(TreePath path).Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/babylon.git pull/1205/head:pull/1205$ git checkout pull/1205Update a local copy of the PR:
$ git checkout pull/1205$ git pull https://git.openjdk.org/babylon.git pull/1205/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1205View PR using the GUI difftool:
$ git pr show -t 1205Using diff file
Download this PR as a diff file:
https://git.openjdk.org/babylon/pull/1205.diff
Using Webrev
Link to Webrev Comment