Failed

org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest_1_8.testBug435689 - 12 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

Failing for the past 10 builds (Since Failed#44 )
Took 1 sec.

Error Message

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

------------ but was ------------
Test.java:11: error: incompatible types: cannot infer type-variable(s) U\n
  new Foo<Bar>().apply(bar -> bar::setBar);\n
                      ^\n
    (argument mismatch; bad return type in lambda expression\n
      invalid method reference\n
        incompatible types: Object cannot be converted to String)\n
  where U,T are type-variables:\n
    U extends Object declared in method <U>apply(Function<T,Consumer<U>>)\n
    T extends Object declared in class Foo\n
1 error\n

--------- Difference is ----------
 expected:<[]> but was:<[Test.java:11: error: incompatible types: cannot infer type-variable(s) U\n
  new Foo<Bar>().apply(bar -> bar::setBar);\n
                      ^\n
    (argument mismatch; bad return type in lambda expression\n
      invalid method reference\n
        incompatible types: Object cannot be converted to String)\n
  where U,T are type-variables:\n
    U extends Object declared in method <U>apply(Function<T,Consumer<U>>)\n
    T extends Object declared in class Foo\n
1 error\n
]>

Stacktrace

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

------------ but was ------------
Test.java:11: error: incompatible types: cannot infer type-variable(s) U\n
		new Foo<Bar>().apply(bar -> bar::setBar);\n
		                    ^\n
    (argument mismatch; bad return type in lambda expression\n
      invalid method reference\n
        incompatible types: Object cannot be converted to String)\n
  where U,T are type-variables:\n
    U extends Object declared in method <U>apply(Function<T,Consumer<U>>)\n
    T extends Object declared in class Foo\n
1 error\n

--------- Difference is ----------
 expected:<[]> but was:<[Test.java:11: error: incompatible types: cannot infer type-variable(s) U\n
		new Foo<Bar>().apply(bar -> bar::setBar);\n
		                    ^\n
    (argument mismatch; bad return type in lambda expression\n
      invalid method reference\n
        incompatible types: Object cannot be converted to String)\n
  where U,T are type-variables:\n
    U extends Object declared in method <U>apply(Function<T,Consumer<U>>)\n
    T extends Object declared in class Foo\n
1 error\n
]>
	at org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest_1_8.testBug435689(GenericsRegressionTest_1_8.java:3291)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest_1_8#testBug435689 - 12
Test.java [
import java.util.function.*;
class Foo<T> {
  <U> void apply(Function<T, Consumer<U>> bar) {}
}

class Bar {
  void setBar(String bar){}
}
public class Test {
	void test() {
		new Foo<Bar>().apply(bar -> bar::setBar);
	}
}

]


Full results sent to /tmp/comptest/run.1573297474160/12_20191109_110435.txt

Standard Error

--- javac err: ---
Test.java:11: error: incompatible types: cannot infer type-variable(s) U
		new Foo<Bar>().apply(bar -> bar::setBar);
		                    ^
    (argument mismatch; bad return type in lambda expression
      invalid method reference
        incompatible types: Object cannot be converted to String)
  where U,T are type-variables:
    U extends Object declared in method <U>apply(Function<T,Consumer<U>>)
    T extends Object declared in class Foo
1 error

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