Skip to content

Failed

org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest_9.testBug488663_012 - 10 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

Failing for the past 22 builds (Since #111 )
Took 1.1 sec.

Error Message

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

------------ but was ------------
X.java:10: error: I is abstract; cannot be instantiated\n
  Y<String> y = new Y<>("Done", new I<>() {\n
                                ^\n
1 error\n

--------- Difference is ----------
 expected:<[]> but was:<[X.java:10: error: I is abstract; cannot be instantiated\n
  Y<String> y = new Y<>("Done", new I<>() {\n
                                ^\n
1 error\n
]>

Stacktrace

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

------------ but was ------------
X.java:10: error: I is abstract; cannot be instantiated\n
		Y<String> y = new Y<>("Done", new I<>() {\n
		                              ^\n
1 error\n

--------- Difference is ----------
 expected:<[]> but was:<[X.java:10: error: I is abstract; cannot be instantiated\n
		Y<String> y = new Y<>("Done", new I<>() {\n
		                              ^\n
1 error\n
]>
	at org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest_9.testBug488663_012(GenericsRegressionTest_9.java:347)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest_9#testBug488663_012 - 10
X.java [
public class X {
	String name;
	public X(String name) {
		this.name = name;
	}
	String name() {
		return this.name;
	}
	public static void main(String[] args) {
		Y<String> y = new Y<>("Done", new I<>() {
				public void doSomething(String s) {
					System.out.println(s);
				}
			}){
		};
	}
}
interface I<T> {
	void doSomething(T t);
}
class Y<T> {
	public Y(T t, I<T> i) {
		i.doSomething(t);
	}
}
]


Full results sent to /tmp/comptest/run.1584245034298/10.0.2_20200315_040443.txt

Standard Error

--- javac err: ---
X.java:10: error: I is abstract; cannot be instantiated
		Y<String> y = new Y<>("Done", new I<>() {
		                              ^
1 error

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