mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +02:00

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