inherit unrelated concrete methods with same signature error (IDEA-67838)

This commit is contained in:
Anna Kozlova
2016-01-07 16:06:39 +01:00
parent 34f2d58eaf
commit e32cc02725
5 changed files with 69 additions and 4 deletions
@@ -0,0 +1,18 @@
class A<T> {
public void foo(T t){}
}
class B<K> extends A<K> {
public void foo(String s) {}
}
class <error descr="Methods foo(String) from B and foo(T) from A are inherited with the same signature">C</error> extends B<String> {}
class D<T> {
public void foo(T t){}
public void foo(String s) {}
}
class <error descr="Methods foo(T) from D and foo(String) from D are inherited with the same signature">E</error> extends D<String> {}
class F extends D<String> {
public void foo(String s) {}
}