java-topology/test/langtools/tools/javac/generics/inference/6943278/T6943278.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

12 lines
460 B
Java

/**
* @test /nodynamiccopyright/
* @bug 6943278
* @summary spurious error message for inference and type-variable with erroneous bound
* @compile/fail/ref=T6943278.out -XDrawDiagnostics -Xlint:unchecked T6943278.java
*/
class T6943278<X extends Number & NonExistentInterface> {
<X> T6943278<X> m() { return null;}
<X extends Number & NonExistentInterface> T6943278<X> m(X x) { return null;}
T6943278<?> f1 = m();
T6943278<?> f2 = m("");
}