Failed

org.eclipse.jdt.core.tests.compiler.regression.LambdaExpressionsTest.test461004 - 1.8 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

Failing for the past 4 builds (Since #6 )
Took 0.78 sec.

Error Message

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

------------ but was ------------
Ice.java:16: error: reference to create is ambiguous\n
    BiPredicate<String, String> ok3 = create( String::valueOf );\n
                                      ^\n
  both method <T#1>create(BiPredicate<? super T#1,? super T#1>) in Ice and method <T#2,K>create(Function<? super T#2,? super K>) in Ice match\n
  where T#1,T#2,K are type-variables:\n
    T#1 extends Object declared in method <T#1>create(BiPredicate<? super T#1,? super T#1>)\n
    T#2 extends Object declared in method <T#2,K>create(Function<? super T#2,? super K>)\n
    K extends Object declared in method <T#2,K>create(Function<? super T#2,? super K>)\n
Ice.java:16: error: invalid method reference\n
    BiPredicate<String, String> ok3 = create( String::valueOf );\n
                                              ^\n
  static method valueOf(Object) found in unbound lookup\n
Ice.java:16: error: incompatible types: cannot infer type-variable(s) T\n
    BiPredicate<String, String> ok3 = create( String::valueOf );\n
                                            ^\n
    (argument mismatch; invalid method reference\n
      cannot find symbol\n
        symbol:   method valueOf(String,String)\n
        location: class String)\n
  where T is a type-variable:\n
    T extends Object declared in method <T>create(BiPredicate<? super T,? super T>)\n
3 errors\n

--------- Difference is ----------
 expected:<[]> but was:<[Ice.java:16: error: reference to create is ambiguous\n
    BiPredicate<String, String> ok3 = create( String::valueOf );\n
                                      ^\n
  both method <T#1>create(BiPredicate<? super T#1,? super T#1>) in Ice and method <T#2,K>create(Function<? super T#2,? super K>) in Ice match\n
  where T#1,T#2,K are type-variables:\n
    T#1 extends Object declared in method <T#1>create(BiPredicate<? super T#1,? super T#1>)\n
    T#2 extends Object declared in method <T#2,K>create(Function<? super T#2,? super K>)\n
    K extends Object declared in method <T#2,K>create(Function<? super T#2,? super K>)\n
Ice.java:16: error: invalid method reference\n
    BiPredicate<String, String> ok3 = create( String::valueOf );\n
                                              ^\n
  static method valueOf(Object) found in unbound lookup\n
Ice.java:16: error: incompatible types: cannot infer type-variable(s) T\n
    BiPredicate<String, String> ok3 = create( String::valueOf );\n
                                            ^\n
    (argument mismatch; invalid method reference\n
      cannot find symbol\n
        symbol:   method valueOf(String,String)\n
        location: class String)\n
  where T is a type-variable:\n
    T extends Object declared in method <T>create(BiPredicate<? super T,? super T>)\n
3 errors\n
]>

Stacktrace

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

------------ but was ------------
Ice.java:16: error: reference to create is ambiguous\n
    BiPredicate<String, String> ok3 = create( String::valueOf );\n
                                      ^\n
  both method <T#1>create(BiPredicate<? super T#1,? super T#1>) in Ice and method <T#2,K>create(Function<? super T#2,? super K>) in Ice match\n
  where T#1,T#2,K are type-variables:\n
    T#1 extends Object declared in method <T#1>create(BiPredicate<? super T#1,? super T#1>)\n
    T#2 extends Object declared in method <T#2,K>create(Function<? super T#2,? super K>)\n
    K extends Object declared in method <T#2,K>create(Function<? super T#2,? super K>)\n
Ice.java:16: error: invalid method reference\n
    BiPredicate<String, String> ok3 = create( String::valueOf );\n
                                              ^\n
  static method valueOf(Object) found in unbound lookup\n
Ice.java:16: error: incompatible types: cannot infer type-variable(s) T\n
    BiPredicate<String, String> ok3 = create( String::valueOf );\n
                                            ^\n
    (argument mismatch; invalid method reference\n
      cannot find symbol\n
        symbol:   method valueOf(String,String)\n
        location: class String)\n
  where T is a type-variable:\n
    T extends Object declared in method <T>create(BiPredicate<? super T,? super T>)\n
3 errors\n

--------- Difference is ----------
 expected:<[]> but was:<[Ice.java:16: error: reference to create is ambiguous\n
    BiPredicate<String, String> ok3 = create( String::valueOf );\n
                                      ^\n
  both method <T#1>create(BiPredicate<? super T#1,? super T#1>) in Ice and method <T#2,K>create(Function<? super T#2,? super K>) in Ice match\n
  where T#1,T#2,K are type-variables:\n
    T#1 extends Object declared in method <T#1>create(BiPredicate<? super T#1,? super T#1>)\n
    T#2 extends Object declared in method <T#2,K>create(Function<? super T#2,? super K>)\n
    K extends Object declared in method <T#2,K>create(Function<? super T#2,? super K>)\n
Ice.java:16: error: invalid method reference\n
    BiPredicate<String, String> ok3 = create( String::valueOf );\n
                                              ^\n
  static method valueOf(Object) found in unbound lookup\n
Ice.java:16: error: incompatible types: cannot infer type-variable(s) T\n
    BiPredicate<String, String> ok3 = create( String::valueOf );\n
                                            ^\n
    (argument mismatch; invalid method reference\n
      cannot find symbol\n
        symbol:   method valueOf(String,String)\n
        location: class String)\n
  where T is a type-variable:\n
    T extends Object declared in method <T>create(BiPredicate<? super T,? super T>)\n
3 errors\n
]>
	at org.eclipse.jdt.core.tests.junit.extension.TestCase.assertStringEquals(TestCase.java:260)
	at org.eclipse.jdt.core.tests.junit.extension.TestCase.assertEquals(TestCase.java:236)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runJavac(AbstractRegressionTest.java:2052)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runTest(AbstractRegressionTest.java:2814)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runTest(AbstractRegressionTest.java:2539)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runConformTest(AbstractRegressionTest.java:1342)
	at org.eclipse.jdt.core.tests.compiler.regression.LambdaExpressionsTest.test461004(LambdaExpressionsTest.java:5699)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.LambdaExpressionsTest#test461004 - 1.8
Ice.java [
import java.util.function.BiPredicate;
import java.util.function.Function;
class Ice {
  static <T> BiPredicate<T, T> create(BiPredicate<? super T, ? super T> fn) {
    return null;
  }
  static <T, K> BiPredicate<T, T> create(Function<? super T, ? super K> map) {
    return null;
  }
  void someMethod(BiPredicate<String, String> b) {}
  void method() {
    BiPredicate<String, String> eq = String::equalsIgnoreCase;
    // these all compile:
    BiPredicate<String, String> ok1 = create( eq );
    BiPredicate<String, String> ok2 = create( (a, b) -> true );
    BiPredicate<String, String> ok3 = create( String::valueOf );
    // this causes an internal compiler error, ArrayIndexOutOfBoundsException: 1
    someMethod(create( String::equalsIgnoreCase ));
  }
}

]


Full results sent to /tmp/comptest/run.1514610271420/1.8.0_131_20171230_000432.txt

Standard Error

--- javac err: ---
Ice.java:16: error: reference to create is ambiguous
    BiPredicate<String, String> ok3 = create( String::valueOf );
                                      ^
  both method <T#1>create(BiPredicate<? super T#1,? super T#1>) in Ice and method <T#2,K>create(Function<? super T#2,? super K>) in Ice match
  where T#1,T#2,K are type-variables:
    T#1 extends Object declared in method <T#1>create(BiPredicate<? super T#1,? super T#1>)
    T#2 extends Object declared in method <T#2,K>create(Function<? super T#2,? super K>)
    K extends Object declared in method <T#2,K>create(Function<? super T#2,? super K>)
Ice.java:16: error: invalid method reference
    BiPredicate<String, String> ok3 = create( String::valueOf );
                                              ^
  static method valueOf(Object) found in unbound lookup
Ice.java:16: error: incompatible types: cannot infer type-variable(s) T
    BiPredicate<String, String> ok3 = create( String::valueOf );
                                            ^
    (argument mismatch; invalid method reference
      cannot find symbol
        symbol:   method valueOf(String,String)
        location: class String)
  where T is a type-variable:
    T extends Object declared in method <T>create(BiPredicate<? super T,? super T>)
3 errors

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