mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00

Javac should report error when interface inherits unrelated method with same erasure Reviewed-by: jjg
14 lines
370 B
Java
14 lines
370 B
Java
/*
|
|
* @test /nodynamiccopyright/
|
|
* @bug 6985719
|
|
* @summary Alike methods in interfaces (Inheritance and Overriding)
|
|
* @author mcimadamore
|
|
* @compile/fail/ref=T6985719g.out -XDrawDiagnostics T6985719g.java
|
|
*/
|
|
|
|
import java.util.List;
|
|
|
|
class T6985719g {
|
|
interface A<X> { void f(List<X> ls); }
|
|
interface B extends A<String> { void f(List<Integer> ls); }
|
|
}
|