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

22 lines
443 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8145466
* @summary javac: No line numbers in compilation error
* @compile/fail/ref=DiagnosticRewriterTest2.out -Xdiags:compact -XDrawDiagnostics DiagnosticRewriterTest2.java
*/
class DiagnosticRewriterTest2 {
class Bar {
Bar(Object o) { }
}
void test() {
new Bar(null) {
void g() {
m(2L);
m();
}
};
}
void m(int i) { }
}