Skip to content

Failed

org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest.test204 - 12 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

Failing for the past 1 build (Since #74 )
Took 0.88 sec.

Error Message

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

------------ but was ------------
OverrideBug.java:6: error: name clash: class OverrideBug has two methods with the same erasure, yet neither overrides the other\n
public List<V> put(final K arg0, final List<V> arg1) {\n
               ^\n
  first method:  put(K,List<V>) in Map\n
  second method: put(K,V) in OverrideBug\n
  where K,V are type-variables:\n
    K extends Object declared in class OverrideBug\n
    V extends Object declared in class OverrideBug\n
OverrideBug.java:9: error: name clash: put(K,V) in OverrideBug and put(K,List<V>) in Map have the same erasure, yet neither overrides the other\n
public List<V> put(final K arg0, final V arg1) {\n
               ^\n
  where K,V are type-variables:\n
    K extends Object declared in class OverrideBug\n
    V extends Object declared in class OverrideBug\n
2 errors\n

--------- Difference is ----------
 expected:<[]> but was:<[OverrideBug.java:6: error: name clash: class OverrideBug has two methods with the same erasure, yet neither overrides the other\n
public List<V> put(final K arg0, final List<V> arg1) {\n
               ^\n
  first method:  put(K,List<V>) in Map\n
  second method: put(K,V) in OverrideBug\n
  where K,V are type-variables:\n
    K extends Object declared in class OverrideBug\n
    V extends Object declared in class OverrideBug\n
OverrideBug.java:9: error: name clash: put(K,V) in OverrideBug and put(K,List<V>) in Map have the same erasure, yet neither overrides the other\n
public List<V> put(final K arg0, final V arg1) {\n
               ^\n
  where K,V are type-variables:\n
    K extends Object declared in class OverrideBug\n
    V extends Object declared in class OverrideBug\n
2 errors\n
]>

Stacktrace

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

------------ but was ------------
OverrideBug.java:6: error: name clash: class OverrideBug has two methods with the same erasure, yet neither overrides the other\n
public List<V> put(final K arg0, final List<V> arg1) {\n
               ^\n
  first method:  put(K,List<V>) in Map\n
  second method: put(K,V) in OverrideBug\n
  where K,V are type-variables:\n
    K extends Object declared in class OverrideBug\n
    V extends Object declared in class OverrideBug\n
OverrideBug.java:9: error: name clash: put(K,V) in OverrideBug and put(K,List<V>) in Map have the same erasure, yet neither overrides the other\n
public List<V> put(final K arg0, final V arg1) {\n
               ^\n
  where K,V are type-variables:\n
    K extends Object declared in class OverrideBug\n
    V extends Object declared in class OverrideBug\n
2 errors\n

--------- Difference is ----------
 expected:<[]> but was:<[OverrideBug.java:6: error: name clash: class OverrideBug has two methods with the same erasure, yet neither overrides the other\n
public List<V> put(final K arg0, final List<V> arg1) {\n
               ^\n
  first method:  put(K,List<V>) in Map\n
  second method: put(K,V) in OverrideBug\n
  where K,V are type-variables:\n
    K extends Object declared in class OverrideBug\n
    V extends Object declared in class OverrideBug\n
OverrideBug.java:9: error: name clash: put(K,V) in OverrideBug and put(K,List<V>) in Map have the same erasure, yet neither overrides the other\n
public List<V> put(final K arg0, final V arg1) {\n
               ^\n
  where K,V are type-variables:\n
    K extends Object declared in class OverrideBug\n
    V extends Object declared in class OverrideBug\n
2 errors\n
]>
	at org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest.test204(MethodVerifyTest.java:11483)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest#test204 - 12
OverrideBug.java [
import java.util.List;
interface Map<K, V> {
	public V put(K key, V value);
}
public class OverrideBug<K, V> implements Map<K, List<V>> {
public List<V> put(final K arg0, final List<V> arg1) {
    return null;
}
public List<V> put(final K arg0, final V arg1) {
    return null;
}
}
]


Full results sent to /tmp/comptest/run.1584180334688/12_20200314_100536.txt

Standard Error

--- javac err: ---
OverrideBug.java:6: error: name clash: class OverrideBug has two methods with the same erasure, yet neither overrides the other
public List<V> put(final K arg0, final List<V> arg1) {
               ^
  first method:  put(K,List<V>) in Map
  second method: put(K,V) in OverrideBug
  where K,V are type-variables:
    K extends Object declared in class OverrideBug
    V extends Object declared in class OverrideBug
OverrideBug.java:9: error: name clash: put(K,V) in OverrideBug and put(K,List<V>) in Map have the same erasure, yet neither overrides the other
public List<V> put(final K arg0, final V arg1) {
               ^
  where K,V are type-variables:
    K extends Object declared in class OverrideBug
    V extends Object declared in class OverrideBug
2 errors

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