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

20 lines
495 B
Java

/*
* @test /nodynamiccopyright/
* @bug 5017953
* @summary spurious cascaded diagnostics when name not found
* @compile/fail/ref=T5017953.out -XDrawDiagnostics T5017953.java
*/
class T5017953 {
int f = 0;
void test(int i) {}
{ test(NonExistentClass.f ++);
test(1 + NonExistentClass.f);
test(NonExistentClass.f + 1);
test(NonExistentClass.f + NonExistentClass.f);
test(NonExistentClass.f += 1);
test(f += NonExistentClass.f);
}
}