RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference [v2]

Vicente Romero vromero at openjdk.java.net
Thu Sep 10 18:16:12 UTC 2020

On Thu, 10 Sep 2020 13:58:03 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

>> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrRecover.java line 103:
>>> 101:                 if ((todo.candSym.flags() & Flags.VARARGS) == 0 &&
>>> 102:                     mit.args.length() > todo.candSym.type.getParameterTypes().length()) {
>>> 103:                     break RECOVER; //too many actual parameters, skip
>> question: why not covering varargs too?
> Note this is a case where the invoked method is not a varargs method, and there are too many actual parameters. But it
> is true the varags handling could be improved, which I tried to do in a recent patch (32845dd).

I like the patch. I think it is great. My only comment would be about test: TestGetTypeMirrorReference.java which does
a golden file like comparison but I understand that there are not many options. I would suggest though to place this
test along with file: TestGetTypeMirrorReferenceData.java in a separate folder and add some doc to the test so that it
would be easier to modify it in the future


PR: https://git.openjdk.java.net/jdk/pull/50

More information about the compiler-dev mailing list