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

17 lines
421 B
Java

/*
* @test /nodynamiccopyright/
* @bug 4720356
* @summary compiler fails to check cross-package overriding
* @author gafter
*
* @compile/fail/ref=T4720356a.out -XDrawDiagnostics T4720356a.java T4720356b.java
*/
package p1;
public class T4720356a {
void m() {}
}
class T4720356c extends p2.T4720356b {
// conflicting return type, even though a.m() not inherited
public int m() { return 1; }
}