Failed

org.eclipse.jdt.core.tests.compiler.parser.SelectionParserTest12.test018 - 13 (from org.eclipse.jdt.core.tests.compiler.parser.TestAll)

Failing for the past 36 builds (Since #383 )
Took 1 ms.

Error Message

invalid selection unit-X.java.
----------- Expected ------------
import org.eclipse.jdt.annotation.*;\n
import java.util.function.*;\n
interface IN0 {\n
}\n
interface IN1 extends IN0 {\n
}\n
interface IN2 extends IN0 {\n
}\n
public class X {\n
  public X() {\n
  }\n
  IN1 n_1() {\n
  }\n
  IN2 n_2() {\n
  }\n
  <M>void m(Supplier<M> m2) {\n
  }\n
  void testSw(int i) {\n
    m(switch (i) {\n
case 1 ->\n
 <SelectionOnReferenceExpressionName:this::n_1>;\n
default ->\n
 this::n_2;\n
});\n
  }\n
}\n

------------ but was ------------
import org.eclipse.jdt.annotation.*;\n
import java.util.function.*;\n
interface IN0 {\n
}\n
interface IN1 extends IN0 {\n
}\n
interface IN2 extends IN0 {\n
}\n
public class X {\n
  public X() {\n
  }\n
  IN1 n_1() {\n
  }\n
  IN2 n_2() {\n
  }\n
  <M>void m(Supplier<M> m2) {\n
  }\n
  void testSw(int i) {\n
    m(switch (i) {\n
case 1 ->\n
    yield <SelectionOnReferenceExpressionName:this::n_1>;\n
default ->\n
    yield this::n_2;\n
});\n
  }\n
}\n

--------- Difference is ----------
 expected:<...i) {\n
case 1 ->\n
 [<SelectionOnReferenceExpressionName:this::n_1>;\n
default ->\n
] this::n_2;\n
});\n
...> but was:<...i) {\n
case 1 ->\n
 [   yield <SelectionOnReferenceExpressionName:this::n_1>;\n
default ->\n
    yield] this::n_2;\n
});\n
...>

Stacktrace

junit.framework.ComparisonFailure: 
invalid selection unit-X.java.
----------- Expected ------------
import org.eclipse.jdt.annotation.*;\n
import java.util.function.*;\n
interface IN0 {\n
}\n
interface IN1 extends IN0 {\n
}\n
interface IN2 extends IN0 {\n
}\n
public class X {\n
  public X() {\n
  }\n
  IN1 n_1() {\n
  }\n
  IN2 n_2() {\n
  }\n
  <M>void m(Supplier<M> m2) {\n
  }\n
  void testSw(int i) {\n
    m(switch (i) {\n
case 1 ->\n
 <SelectionOnReferenceExpressionName:this::n_1>;\n
default ->\n
 this::n_2;\n
});\n
  }\n
}\n

------------ but was ------------
import org.eclipse.jdt.annotation.*;\n
import java.util.function.*;\n
interface IN0 {\n
}\n
interface IN1 extends IN0 {\n
}\n
interface IN2 extends IN0 {\n
}\n
public class X {\n
  public X() {\n
  }\n
  IN1 n_1() {\n
  }\n
  IN2 n_2() {\n
  }\n
  <M>void m(Supplier<M> m2) {\n
  }\n
  void testSw(int i) {\n
    m(switch (i) {\n
case 1 ->\n
    yield <SelectionOnReferenceExpressionName:this::n_1>;\n
default ->\n
    yield this::n_2;\n
});\n
  }\n
}\n

--------- Difference is ----------
 expected:<...i) {\n
case 1 ->\n
 [<SelectionOnReferenceExpressionName:this::n_1>;\n
default ->\n
] this::n_2;\n
});\n
...> but was:<...i) {\n
case 1 ->\n
 [   yield <SelectionOnReferenceExpressionName:this::n_1>;\n
default ->\n
    yield] this::n_2;\n
});\n
...>
	at org.eclipse.jdt.core.tests.compiler.parser.SelectionParserTest12.test018(SelectionParserTest12.java:844)

Standard Output

		"import org.eclipse.jdt.annotation.*;\n" + 
		"import java.util.function.*;\n" + 
		"interface IN0 {\n" + 
		"}\n" + 
		"interface IN1 extends IN0 {\n" + 
		"}\n" + 
		"interface IN2 extends IN0 {\n" + 
		"}\n" + 
		"public class X {\n" + 
		"  public X() {\n" + 
		"  }\n" + 
		"  IN1 n_1() {\n" + 
		"  }\n" + 
		"  IN2 n_2() {\n" + 
		"  }\n" + 
		"  <M>void m(Supplier<M> m2) {\n" + 
		"  }\n" + 
		"  void testSw(int i) {\n" + 
		"    m(switch (i) {\n" + 
		"case 1 ->\n" + 
		"    yield <SelectionOnReferenceExpressionName:this::n_1>;\n" + 
		"default ->\n" + 
		"    yield this::n_2;\n" + 
		"});\n" + 
		"  }\n" + 
		"}\n"