1/*
2 * @test /nodynamiccopyright/
3 * @bug 6962494
4 * @summary The order of elements of intersection types shouldn't matter
5 * @compile/fail/ref=OrderedIntersections.out -XDrawDiagnostics OrderedIntersections.java
6 */
7
8interface i1 {}
9interface i2 {}
10
11public class OrderedIntersections {
12    static <t1 extends i1 & i2> Object smf(t1 x) {
13        System.out.println( " smf1 " );
14        return null;
15    }
16
17    static <t2 extends i2 & i1> Object smf(t2 x) {
18        System.out.println( " smf2 " );
19        return null;
20    }
21}
22