Failed
org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest_1_8.testBug424415b - 1.8 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)
Error Message
testBug424415b - Javac found error(s) but Eclipse did not find any. ----------- Expected ------------ ------------ but was ------------ X.java:17: error: incompatible types: inferred type does not conform to upper bound(s)\n foo(goo(ArrayList<String>::new));\n ^\n inferred: ArrayList<String>\n upper bound(s): String,Collection<?>\n Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output\n 1 error\n --------- Difference is ---------- expected:<[]> but was:<[X.java:17: error: incompatible types: inferred type does not conform to upper bound(s)\n foo(goo(ArrayList<String>::new));\n ^\n inferred: ArrayList<String>\n upper bound(s): String,Collection<?>\n Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output\n 1 error\n ]>
Stacktrace
junit.framework.ComparisonFailure: testBug424415b - Javac found error(s) but Eclipse did not find any. ----------- Expected ------------ ------------ but was ------------ X.java:17: error: incompatible types: inferred type does not conform to upper bound(s)\n foo(goo(ArrayList<String>::new));\n ^\n inferred: ArrayList<String>\n upper bound(s): String,Collection<?>\n Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output\n 1 error\n --------- Difference is ---------- expected:<[]> but was:<[X.java:17: error: incompatible types: inferred type does not conform to upper bound(s)\n foo(goo(ArrayList<String>::new));\n ^\n inferred: ArrayList<String>\n upper bound(s): String,Collection<?>\n Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output\n 1 error\n ]> at org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest_1_8.testBug424415b(GenericsRegressionTest_1_8.java:350)
Standard Output
org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest_1_8#testBug424415b - 1.8 X.java [ import java.util.ArrayList; import java.util.Collection; interface Functional<T> { T apply(); } class X { void foo(Object o) { } void foo(String str) {} <Q extends Collection<?>> Q goo(Functional<Q> s) { return null; } void test() { foo(goo(ArrayList<String>::new)); } } ] Full results sent to /home/jenkins/agent/workspace/eclipse.jdt.core-run.javac-1.8/tmp/comptest/run.1584479137560/1.8.0_202_20200317_210541.txt
Standard Error
--- javac err: --- X.java:17: error: incompatible types: inferred type does not conform to upper bound(s) foo(goo(ArrayList<String>::new)); ^ inferred: ArrayList<String> upper bound(s): String,Collection<?> Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 1 error ----------------------------------------