Skip to content

Failed

org.eclipse.jdt.core.tests.compiler.regression.GenericTypeTest.test0383 - 12 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

Failing for the past 1 build (Since #44 )
Took 2.1 sec.

Error Message

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

------------ but was ------------
----------\n
1. ERROR in X.java (at line 1)\n
 public abstract class X extends Y implements I {}\n
                       ^\n
Name clash: The method foo(Class<T>) of type Y has the same erasure as foo(Class<T>) of type I but does not override it\n
----------\n

--------- Difference is ----------
 expected:<[]> but was:<[----------\n
1. ERROR in X.java (at line 1)\n
 public abstract class X extends Y implements I {}\n
                       ^\n
Name clash: The method foo(Class<T>) of type Y has the same erasure as foo(Class<T>) of type I but does not override it\n
----------\n
]>

Stacktrace

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

------------ but was ------------
----------\n
1. ERROR in X.java (at line 1)\n
	public abstract class X extends Y implements I {}\n
	                      ^\n
Name clash: The method foo(Class<T>) of type Y has the same erasure as foo(Class<T>) of type I but does not override it\n
----------\n

--------- Difference is ----------
 expected:<[]> but was:<[----------\n
1. ERROR in X.java (at line 1)\n
	public abstract class X extends Y implements I {}\n
	                      ^\n
Name clash: The method foo(Class<T>) of type Y has the same erasure as foo(Class<T>) of type I but does not override it\n
----------\n
]>
	at org.eclipse.jdt.core.tests.compiler.regression.GenericTypeTest.test0383(GenericTypeTest.java:11569)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.GenericTypeTest#test0383 - 12
X.java [
public abstract class X extends Y implements I {}
interface I { <T> void foo(Class<T> s); }
class Y { public <T, S> void foo(Class<T> s) {} }

]


Full results sent to /tmp/genie.jdt/comptest/run.1565715170219/12_20190813_125251.txt

Standard Error

--- javac err: ---
X.java:1: error: X is not abstract and does not override abstract method <T,S>foo(Class<T>) in I
public class X extends Y implements I { public <T> void foo(Class<T> s) {} }
       ^
  where T,S are type-variables:
    T extends Object declared in method <T,S>foo(Class<T>)
    S extends Object declared in method <T,S>foo(Class<T>)
X.java:1: error: name clash: foo(Class<T#1>) in X and foo(Class<T#2>) in I have the same erasure, yet neither overrides the other
public class X extends Y implements I { public <T> void foo(Class<T> s) {} }
                                                        ^
  where T#1,T#2,S are type-variables:
    T#1 extends Object declared in method <T#1>foo(Class<T#1>)
    T#2 extends Object declared in method <T#2,S>foo(Class<T#2>)
    S extends Object declared in method <T#2,S>foo(Class<T#2>)
2 errors

--- javac err: ---
X.java:1: error: X is not abstract and does not override abstract method <T,S>foo(Class<T>) in I
public class X extends Y implements I {}
       ^
  where T,S are type-variables:
    T extends Object declared in method <T,S>foo(Class<T>)
    S extends Object declared in method <T,S>foo(Class<T>)
1 error

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