jdk
1/*
2* @test /nodynamiccopyright/
3* @bug 6360970
4* @summary javac erroneously accept ambiguous field reference
5* @compile/fail/ref=T6360970.out -XDrawDiagnostics T6360970.java
6*/
7class T6360970 {
8interface A {
9int i = 1;
10}
11
12interface B {
13int i = 2;
14}
15
16interface C extends A, B { }
17
18static class D {
19public static final int i = 0;
20}
21
22static class E extends D implements C { }
23
24int i = E.i; //ambiguous
25}
26