Failed
org.eclipse.jdt.core.tests.compiler.regression.AmbiguousMethodTest.test087 - 12 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)
Failing for the past 1 build
(Since Failed
)
Error Message
test087 - Javac found error(s) but Eclipse did not find any. ----------- Expected ------------ ------------ but was ------------ X.java:6: error: reference to with is ambiguous\n static { with(null); }\n ^\n both method <T#1>with(List<? extends T#1>) in X and method <T#2>with(Collection<T#2>) in X match\n where T#1,T#2 are type-variables:\n T#1 extends Object declared in method <T#1>with(List<? extends T#1>)\n T#2 extends Object declared in method <T#2>with(Collection<T#2>)\n 1 error\n --------- Difference is ---------- expected:<[]> but was:<[X.java:6: error: reference to with is ambiguous\n static { with(null); }\n ^\n both method <T#1>with(List<? extends T#1>) in X and method <T#2>with(Collection<T#2>) in X match\n where T#1,T#2 are type-variables:\n T#1 extends Object declared in method <T#1>with(List<? extends T#1>)\n T#2 extends Object declared in method <T#2>with(Collection<T#2>)\n 1 error\n ]>
Stacktrace
junit.framework.ComparisonFailure: test087 - Javac found error(s) but Eclipse did not find any. ----------- Expected ------------ ------------ but was ------------ X.java:6: error: reference to with is ambiguous\n static { with(null); }\n ^\n both method <T#1>with(List<? extends T#1>) in X and method <T#2>with(Collection<T#2>) in X match\n where T#1,T#2 are type-variables:\n T#1 extends Object declared in method <T#1>with(List<? extends T#1>)\n T#2 extends Object declared in method <T#2>with(Collection<T#2>)\n 1 error\n --------- Difference is ---------- expected:<[]> but was:<[X.java:6: error: reference to with is ambiguous\n static { with(null); }\n ^\n both method <T#1>with(List<? extends T#1>) in X and method <T#2>with(Collection<T#2>) in X match\n where T#1,T#2 are type-variables:\n T#1 extends Object declared in method <T#1>with(List<? extends T#1>)\n T#2 extends Object declared in method <T#2>with(Collection<T#2>)\n 1 error\n ]> at org.eclipse.jdt.core.tests.compiler.regression.AmbiguousMethodTest.test087(AmbiguousMethodTest.java:4402)
Standard Output
org.eclipse.jdt.core.tests.compiler.regression.AmbiguousMethodTest#test087 - 12 X.java [ import java.util.Collection; import java.util.List; public class X { public static <T> List<T> with(List<? extends T> p) { return null; } public static <T> Collection<T> with(Collection<T> p) { return null; } static { with(null); } } ] Full results sent to /tmp/genie.jdt/comptest/run.1565715170219/12_20190813_125251.txt
Standard Error
--- javac err: --- X.java:6: error: reference to with is ambiguous static { with(null); } ^ both method <T#1>with(List<? extends T#1>) in X and method <T#2>with(Collection<T#2>) in X match where T#1,T#2 are type-variables: T#1 extends Object declared in method <T#1>with(List<? extends T#1>) T#2 extends Object declared in method <T#2>with(Collection<T#2>) 1 error ----------------------------------------