java-topology/test/langtools/tools/javac/6360970/T6360970.java
russell@unturf.com 0a580b313d undefect. CWE-407 — 63 sites patched across 27 ecosystems
Authors: russell@unturf.com · brackishbert@gmail.com · foxhop.net · TimeHexOn.com

Patches, unit tests, benchmarks, whitepaper, and outreach briefs.
Public domain — no copyright claimed. Use freely.
2026-03-26 17:11:57 -04:00

25 lines
466 B
Java

/*
* @test /nodynamiccopyright/
* @bug 6360970
* @summary javac erroneously accept ambiguous field reference
* @compile/fail/ref=T6360970.out -XDrawDiagnostics T6360970.java
*/
class T6360970 {
interface A {
int i = 1;
}
interface B {
int i = 2;
}
interface C extends A, B { }
static class D {
public static final int i = 0;
}
static class E extends D implements C { }
int i = E.i; //ambiguous
}