5009937: hiding versus generics versus binary compatibility

Missing implementation of JLS 8.4.8.3 (different arguments with same erasure not always triggering a compiler error)

Reviewed-by: jjg
This commit is contained in:
Maurizio Cimadamore 2008-04-09 13:41:45 +01:00
parent 2daecbb697
commit 3c80eb1a9e
5 changed files with 64 additions and 5 deletions

View file

@ -25,7 +25,7 @@
* @test
* @bug 4984158
* @summary two inherited methods with same signature
* @author gafter
* @author gafter, Maurizio Cimadamore
*
* @compile/fail -source 1.5 InheritanceConflict.java
*/
@ -34,8 +34,11 @@ package inheritance.conflict;
class A<T> {
void f(String s) {}
}
class B<T> extends A<T> {
void f(T t) {}
}
class B extends A<String> {
class C extends B<String> {
}