Skip to content

Failed

org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest_1_8.testBug424415b - 11 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

Failing for the past 35 builds (Since #9 )
Took 0.93 sec.

Error Message

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

------------ but was ------------
X.java:17: error: incompatible types: inference variable Q has incompatible bounds\n
        foo(goo(ArrayList<String>::new));\n
               ^\n
    lower bounds: String,Collection<?>\n
    lower bounds: ArrayList<String>\n
  where Q is a type-variable:\n
    Q extends Collection<?> declared in method <Q>goo(Functional<Q>)\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: inference variable Q has incompatible bounds\n
        foo(goo(ArrayList<String>::new));\n
               ^\n
    lower bounds: String,Collection<?>\n
    lower bounds: ArrayList<String>\n
  where Q is a type-variable:\n
    Q extends Collection<?> declared in method <Q>goo(Functional<Q>)\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: inference variable Q has incompatible bounds\n
        foo(goo(ArrayList<String>::new));\n
               ^\n
    lower bounds: String,Collection<?>\n
    lower bounds: ArrayList<String>\n
  where Q is a type-variable:\n
    Q extends Collection<?> declared in method <Q>goo(Functional<Q>)\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: inference variable Q has incompatible bounds\n
        foo(goo(ArrayList<String>::new));\n
               ^\n
    lower bounds: String,Collection<?>\n
    lower bounds: ArrayList<String>\n
  where Q is a type-variable:\n
    Q extends Collection<?> declared in method <Q>goo(Functional<Q>)\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 - 11
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 /tmp/genie.jdt/comptest/run.1565427784609/11_20190810_050312.txt

Standard Error

--- javac err: ---
X.java:17: error: incompatible types: inference variable Q has incompatible bounds
        foo(goo(ArrayList<String>::new));
               ^
    lower bounds: String,Collection<?>
    lower bounds: ArrayList<String>
  where Q is a type-variable:
    Q extends Collection<?> declared in method <Q>goo(Functional<Q>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error

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