Failed

org.eclipse.jdt.core.tests.compiler.regression.GenericTypeTest.test0994 - 10 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

Failing for the past 14 builds (Since #81 )
Took 0.87 sec.

Error Message

test0994 - Javac found error(s) but Eclipse did not find any.
----------- Expected ------------

------------ but was ------------
X.java:8: error: unexpected type\n
   (b ? x1 : x2).new Inner();\n
                     ^\n
  required: class,package\n
  found:    value\n
1 error\n

--------- Difference is ----------
 expected:<[]> but was:<[X.java:8: error: unexpected type\n
   (b ? x1 : x2).new Inner();\n
                     ^\n
  required: class,package\n
  found:    value\n
1 error\n
]>

Stacktrace

junit.framework.ComparisonFailure: 
test0994 - Javac found error(s) but Eclipse did not find any.
----------- Expected ------------

------------ but was ------------
X.java:8: error: unexpected type\n
	  (b ? x1 : x2).new Inner();\n
	                    ^\n
  required: class,package\n
  found:    value\n
1 error\n

--------- Difference is ----------
 expected:<[]> but was:<[X.java:8: error: unexpected type\n
	  (b ? x1 : x2).new Inner();\n
	                    ^\n
  required: class,package\n
  found:    value\n
1 error\n
]>
	at org.eclipse.jdt.core.tests.compiler.regression.GenericTypeTest.test0994(GenericTypeTest.java:33273)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.GenericTypeTest#test0994 - 10
X.java [
public class X {
  public class Inner {
    Inner() {
      System.out.println("SUCCESS");
    }
  }
  void foo(boolean b, X1 x1, X2 x2) {
	  (b ? x1 : x2).new Inner();
  }
  public static void main(String[] args) {
    new X().foo(true, new X1(), new X2());
  }
}

class X1 extends X implements Comparable<X1> {
  public int compareTo(X1 other) {
    return 0;
  }
}
class X2 extends X implements Comparable<X2> {
  public int compareTo(X2 other) {
    return 0;
  }
}

]


Full results sent to /tmp/genie.jdt/comptest/run.1564891391937/10.0.1_20190804_000320.txt

Standard Error

--- javac err: ---
X.java:8: error: unexpected type
	  (b ? x1 : x2).new Inner();
	                    ^
  required: class,package
  found:    value
1 error

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