Skip to content

Commit

Permalink
Double Lambda causes compiler to ignore other code
Browse files Browse the repository at this point in the history
WIP, DONT MERGE

Test for: eclipse-jdt#859
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
  • Loading branch information
trancexpress committed Mar 23, 2023
1 parent 4b2e462 commit d71720c
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10084,6 +10084,25 @@ public void testBug458332() {
"450\n" +
"250");
}
//https://github.com/eclipse-jdt/eclipse.jdt.core/issues/859, Double Lambda causes compiler to ignore other code
public void testDoubleLambdaAndSemicolonGh859() {
this.runNegativeTest(
new String[] {
"X.java",
"class X {\n"+
" interface S<T> {\n"+
" T s(T t);\n"+
" }\n"+
" void f() {\n"+
" S<S<?>> s = v -> x -> x ) ;\n"+
" {} // empty block to force scope handling for the lambda line\n"+
" }\n"+
"}\n"
},
"----------\n"+
"1. ERROR in X.java (at line 6)\n"+
"----------\n");
}
public static Class testClass() {
return NegativeLambdaExpressionsTest.class;
}
Expand Down

0 comments on commit d71720c

Please sign in to comment.