java-topology/test/langtools/tools/javac/overload/T4743490.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

24 lines
566 B
Java

/*
* @test /nodynamiccopyright/
* @bug 4743490
* @summary overloading versus super.f(args) versus interfaces
* @author gafter
* @compile/fail/ref=T4743490.out -XDrawDiagnostics T4743490.java
*/
class T4743490 {
static class A {
public void m(Object o, String s) {}
}
interface B {
void m(String s, Object o);
}
static abstract class C extends A implements B {
}
static abstract class D extends C {
void foo() {
C c = null;
super.m("", ""); // should be ambiguous.
}
}
}