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
8264216: [lworld] unknown.Class.default gives misleading compilation error #372
Conversation
|
@jespersm 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 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and 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 (@sadayapalam) but any other Committer may sponsor as well.
|
Webrevs
|
/integrate |
Thanks Jesper, I offer to be the reviewer and sponsor for this. Will study this later today and share any comments. |
Please fix the issues mentioned. Also confirm whether you have run all the tests.
@@ -38,6 +38,7 @@ | |||
import com.sun.source.tree.TreeVisitor; | |||
import com.sun.source.util.SimpleTreeVisitor; | |||
import com.sun.tools.javac.code.*; | |||
import com.sun.tools.javac.code.Kinds.KindName; |
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.
This import looks unused ??
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.
Ooopsie, I'll fix that.
log.error(tree.pos, Errors.CantResolveLocation(Kinds.KindName.CLASS, site.tsym.getQualifiedName(), null, null, | ||
Fragments.Location(Kinds.typeKindName(env.enclClass.type), env.enclClass.type, null))); | ||
yield syms.errSymbol; | ||
} |
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 ok, inventing a new error message altogether (such as default cannot be applied to a package) looks too heavy a hammer.
test/langtools/tools/javac/valhalla/lworld-values/UnknownTypeDefault.out
Show resolved
Hide resolved
/sponsor |
@sadayapalam The PR has been updated since the change author (@jespersm) issued the |
/integrate |
/sponsor |
@sadayapalam @jespersm Since your change was applied there have been 2 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 28a4ec0. |
Make the compilation error for
somepkgname.UnknownClass.default
as informative asUnknownClass.default
.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/valhalla pull/372/head:pull/372
$ git checkout pull/372
Update a local copy of the PR:
$ git checkout pull/372
$ git pull https://git.openjdk.java.net/valhalla pull/372/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 372
View PR using the GUI difftool:
$ git pr show -t 372
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/valhalla/pull/372.diff