RFR: 8315452: Erroneous AST missing modifiers for partial input
Jan Lahoda
jlahoda at openjdk.org
Thu Aug 31 14:34:20 UTC 2023
Consider code like:
package test;
public
Before [JDK-8305671](https://bugs.openjdk.org/browse/JDK-8305671), this was producing an AST which included the package clause + an ErroneousTree, which contained the `public` as partial modifiers.
After [JDK-8305671](https://bugs.openjdk.org/browse/JDK-8305671), the `public` is no longer included in the AST, and hence it is invisible for tools that operate on the AST.
My proposal is to return the `public` back to the AST. Seems that the problem from [JDK-8305671](https://bugs.openjdk.org/browse/JDK-8305671) can be solved by breaking out of the outter loop, instead of inner loop, as it was before [JDK-8305671](https://bugs.openjdk.org/browse/JDK-8305671), without affecting non-eof situations.
-------------
Commit messages:
- 8315452: Erroneous AST missing modifiers for partial input
Changes: https://git.openjdk.org/jdk/pull/15517/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15517&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8315452
Stats: 64 lines in 2 files changed: 60 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/15517.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15517/head:pull/15517
PR: https://git.openjdk.org/jdk/pull/15517
More information about the compiler-dev
mailing list