mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
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:
parent
2daecbb697
commit
3c80eb1a9e
5 changed files with 64 additions and 5 deletions
|
@ -25,7 +25,7 @@
|
|||
* @test
|
||||
* @bug 4984158
|
||||
* @summary two inherited methods with same signature
|
||||
* @author gafter
|
||||
* @author gafter, Maurizio Cimadamore
|
||||
*
|
||||
* @compile -source 1.5 InheritanceConflict2.java
|
||||
*/
|
||||
|
@ -34,9 +34,12 @@ package inheritance.conflict2;
|
|||
|
||||
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> {
|
||||
void f(String s) {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue