1/**
2 * @test     /nodynamiccopyright/
3 * @bug      7062745 7157798
4 * @summary  Negative test of conflicting same-name methods inherited from multiple interfaces when parameter types not compatible
5 * @compile/fail/ref=Test4.out -Werror -Xlint:unchecked -XDrawDiagnostics Test4.java
6 */
7
8import java.util.Set;
9import java.util.HashSet;
10
11interface A { void m(Set<Integer> s); }
12interface B { void m(Set<String> s); }
13interface C { void m(Set<?> s); }
14
15interface AB extends A, B {} //error
16
17interface AC extends A, C {} //error
18
19interface D<T> { void m(Set<T> s); }
20
21interface AD extends A, D<Integer> {} //OK
22
23interface AD2 extends A, D<Number> {} //error
24
25interface CD<T> extends C, D<T> {} //error
26
27interface E { <T> void m(Set<T> s); }
28
29interface DE<T> extends D<T>, E {} //error
30