RFR: 8059632: Method reference compilation uses incorrect qualifying type

Andrey Turbanov aturbanov at openjdk.org
Sun Oct 23 11:34:51 UTC 2022


On Fri, 21 Oct 2022 09:31:11 GMT, Srikanth Adayapalam <sadayapalam at openjdk.org> wrote:

> Align with JLS 13.1 (the qualifying class or interface of the method invocation) by
>     referring to the type of the receiver rather than the type of the declaring 
>     class/interface in the bootstrap attribute

test/langtools/tools/javac/lambda/methodReference/8059632/MethodRefQualifyingTypeTest.java line 57:

> 55:             MyFunctionalInterface instance = null;
> 56:             MethodSupplierImpl ms = new MethodSupplierImpl() {
> 57:                     public  int m(int a){

Suggestion:

                    public int m(int a){

-------------

PR: https://git.openjdk.org/jdk/pull/10809


More information about the compiler-dev mailing list