Failed

org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest_1_8.testBug528970 - 10 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

Failing for the past 11 builds (Since #81 )
Took 0.93 sec.

Error Message

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

------------ but was ------------
X.java:10: error: incompatible types: cannot infer type-variable(s) T\n
  List<AtomicReference<?>> l = returnNull(AtomicReference.class);\n
                                         ^\n
    (argument mismatch; Class<AtomicReference> cannot be converted to Class<? extends AtomicReference<?>>)\n
  where T is a type-variable:\n
    T extends Object declared in method <T>returnNull(Class<? extends T>)\n
1 error\n

--------- Difference is ----------
 expected:<[]> but was:<[X.java:10: error: incompatible types: cannot infer type-variable(s) T\n
  List<AtomicReference<?>> l = returnNull(AtomicReference.class);\n
                                         ^\n
    (argument mismatch; Class<AtomicReference> cannot be converted to Class<? extends AtomicReference<?>>)\n
  where T is a type-variable:\n
    T extends Object declared in method <T>returnNull(Class<? extends T>)\n
1 error\n
]>

Stacktrace

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

------------ but was ------------
X.java:10: error: incompatible types: cannot infer type-variable(s) T\n
		List<AtomicReference<?>> l = returnNull(AtomicReference.class);\n
		                                       ^\n
    (argument mismatch; Class<AtomicReference> cannot be converted to Class<? extends AtomicReference<?>>)\n
  where T is a type-variable:\n
    T extends Object declared in method <T>returnNull(Class<? extends T>)\n
1 error\n

--------- Difference is ----------
 expected:<[]> but was:<[X.java:10: error: incompatible types: cannot infer type-variable(s) T\n
		List<AtomicReference<?>> l = returnNull(AtomicReference.class);\n
		                                       ^\n
    (argument mismatch; Class<AtomicReference> cannot be converted to Class<? extends AtomicReference<?>>)\n
  where T is a type-variable:\n
    T extends Object declared in method <T>returnNull(Class<? extends T>)\n
1 error\n
]>
	at org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest_1_8.testBug528970(GenericsRegressionTest_1_8.java:8869)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest_1_8#testBug528970 - 10
X.java [
import java.util.*;
import java.util.concurrent.atomic.*;
public class X {
	public static <T> List<T> returnNull(Class<? extends T> clazz) {
		return null;
	}

	public static void main( String[] args )
	{
		List<AtomicReference<?>> l = returnNull(AtomicReference.class);
	}}

]


Full results sent to /tmp/genie.jdt/comptest/run.1563077023750/10.0.1_20190714_000352.txt

Standard Error

--- javac err: ---
X.java:10: error: incompatible types: cannot infer type-variable(s) T
		List<AtomicReference<?>> l = returnNull(AtomicReference.class);
		                                       ^
    (argument mismatch; Class<AtomicReference> cannot be converted to Class<? extends AtomicReference<?>>)
  where T is a type-variable:
    T extends Object declared in method <T>returnNull(Class<? extends T>)
1 error

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