highlighting: don't check static methods for unrelated inheritance (IDEA-178539)

in class case, static methods must have signatures with different erasures, for interfaces, static methods
This commit is contained in:
Anna Kozlova
2017-09-06 16:05:05 +03:00
parent 955a6160cd
commit 8032558bec
3 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
import java.util.List;
class InterfaceStaticMethodsWithSameErasure {
interface A<I, R> {
static <I, R> A<I, R> foo(List<I> a) { return null; }
}
interface B<I, R> extends A<I, R> {
static <I, R> B<I, R> foo(List<R> b) { return null; }
}
static abstract class C<I, R> implements B<I, R> { }
static class D<I, R> extends C<I, R> { }
}