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
8269113: Javac throws when compiling switch (null) #4679
Conversation
👋 Welcome back gli! A progress list of the required criteria for merging this PR into |
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. Might make sense to submit against openjdk/jdk17 and integrate there?
@lgxbslgx 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 /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 47 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
@lahodaj thanks for your review. I will move this patch to JDK 17 later. |
I am sorry, but it may not be so simple. I apologize for that, I need to do some more investigations, sorry. |
Never mind. I will continue to contact or assist you in this PR. If the final patch is not large, it could be moved to JDK 17 at last. |
@lgxbslgx This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@lgxbslgx This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
Hi all,
When we use
switch(null)
in the source code, the type of the selector isBottomType
.So the statement
Type seltype = selector.type;
of the methodTransPatterns::handleSwitch
will get aBottomType
.Then compiler mistakenly uses this
BottomType
to construct a newVarSymbol
.At last, when the compiler uses the new
VarSymbol temp
to construct a newJCVariableDecl
(the code shown as below), it crashes at the methodTreeMaker::Type
because the methodTreeMaker::Type
can't handle the typeBottomType
.This patch changes the type from
BottomType
tosyms.objectType
and adds the corresponding test.Thanks for taking the time to review.
Best Regards,
-- Guoxiong
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4679/head:pull/4679
$ git checkout pull/4679
Update a local copy of the PR:
$ git checkout pull/4679
$ git pull https://git.openjdk.java.net/jdk pull/4679/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4679
View PR using the GUI difftool:
$ git pr show -t 4679
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4679.diff