jdk-24/test/langtools/tools/javac/generics/InheritanceConflict.java

22 lines
389 B
Java
Raw Normal View History

2007-12-01 00:00:00 +00:00
/*
* @test /nodynamiccopyright/
2007-12-01 00:00:00 +00:00
* @bug 4984158
* @summary two inherited methods with same signature
* @author gafter, Maurizio Cimadamore
2007-12-01 00:00:00 +00:00
*
* @compile/fail/ref=InheritanceConflict.out -XDrawDiagnostics InheritanceConflict.java
2007-12-01 00:00:00 +00:00
*/
package inheritance.conflict;
class A<T> {
void f(String s) {}
}
class B<T> extends A<T> {
2007-12-01 00:00:00 +00:00
void f(T t) {}
}
class C extends B<String> {
2007-12-01 00:00:00 +00:00
}