Skip to content

Commit

Permalink
Wrong error line for "No enclosing instance of type ___ is accessible"
Browse files Browse the repository at this point in the history
when using method reference

Fixes eclipse-jdt#3207
  • Loading branch information
stephan-herrmann committed Dec 30, 2024
1 parent 3bc85de commit d7a0d36
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6584,9 +6584,9 @@ public void test406588() {
"}\n"
},
"----------\n" +
"1. ERROR in X.java (at line 1)\n" +
" interface I {\n" +
" ^\n" +
"1. ERROR in X.java (at line 10)\n" +
" this(Z::new);\n" +
" ^^^^^^\n" +
"No enclosing instance of type X.Y is available due to some intermediate constructor invocation\n" +
"----------\n");
}
Expand All @@ -6607,9 +6607,9 @@ public void test406586() {
"}\n"
},
"----------\n" +
"1. ERROR in X.java (at line 1)\n" +
" interface I {\n" +
" ^\n" +
"1. ERROR in X.java (at line 8)\n" +
" I i = Y::new;\n" +
" ^^^^^^\n" +
"No enclosing instance of type X is accessible. Must qualify the allocation with an enclosing instance of type X (e.g. x.new A() where x is an instance of X).\n" +
"----------\n");
}
Expand Down

0 comments on commit d7a0d36

Please sign in to comment.