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
8253584: Redunant errors for partial member selects #333
Conversation
|
@lahodaj The following label will be automatically applied to this pull request: When this pull request is ready to be reviewed, an RFR email will be sent to the corresponding mailing list. If you would like to change these labels, use the |
Webrevs
|
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.
looks good to me
@lahodaj This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /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
|
/integrate |
@lahodaj Since your change was applied there have been 7 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 86491a5. |
For code like:
(note the missing member name after
s().
), javac will produce a number of compile-time errors:The reason is that after not seeing an identifier after the
.
javac will skip the token that follows the dot. This was done to improve errors in https://bugs.openjdk.java.net/browse/JDK-8081769 . But here, reading the next token will skip the closing}
, and the parser will de-synchronize with the braces, leading to the follow-up errors.The proposal here is to handle incorrect
.class
specially, and avoid reading the next token when an identifier is no specified in a member select, except when the next token isclass
.The errors with this patch are:
This seems much better.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/333/head:pull/333
$ git checkout pull/333