8043251: Bogus javac error: required: no arguments, found: no arguments#10799
8043251: Bogus javac error: required: no arguments, found: no arguments#10799archiecobbs wants to merge 4 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back archiecobbs! A progress list of the required criteria for merging this PR into |
|
@archiecobbs 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 /label pull request command. |
Webrevs
|
|
@archiecobbs 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! |
|
keepalive |
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
Outdated
Show resolved
Hide resolved
vicente-romero-oracle
left a comment
There was a problem hiding this comment.
looks sensible
|
@archiecobbs 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 155 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. 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 (@vicente-romero-oracle) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
/integrate |
|
@archiecobbs |
|
/sponsor |
|
Going to push as commit 679e485.
Your commit was automatically rebased without conflicts. |
|
@vicente-romero-oracle @archiecobbs Pushed as commit 679e485. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
We have an error message
compiler.err.cant.apply.symbolfor cases where a method invocation doesn't resolve. It shows the "required" parameters and the "found" parameters, plus a further description of the problem.This message being used inappropriately when the problem is actually due to explicitly passed method type parameters instead of regular method parameters.
For example, if you do this:
the error reported is this:
The real error here is
wrong number of type arguments; required 1, but thecompiler.err.cant.apply.symbolerror message that assumes the problem is with the regular parameters, which it displays. The result is the appearance of the useless and confusingrequiredandfoundlines.This patch creates an alternate version of that error message (
compiler.err.cant.apply.symbol.noargs) that omits therequiredandfoundlines, and makes the compiler use this alternate message when the error is due to type parameters (specifically, when the underlying error is "wrong number of type arguments" or "explicit type argument X does not conform to declared bound(s)").This improves the error for example above to this:
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10799/head:pull/10799$ git checkout pull/10799Update a local copy of the PR:
$ git checkout pull/10799$ git pull https://git.openjdk.org/jdk pull/10799/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10799View PR using the GUI difftool:
$ git pr show -t 10799Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10799.diff