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

19 lines
434 B
Java

/**
* @test /nodynamiccopyright/
* @bug 7177306
* @summary Regression: unchecked method call does not erase return type
* @compile/fail/ref=T7177306a.out -Werror -Xlint:unchecked -XDrawDiagnostics T7177306a.java
*/
import java.util.List;
class T7177306a<A> {
public static void test(List l) {
T7177306a<Object> to = m(l);
}
public static <E> T7177306a<String> m(List<E> le) {
return null;
}
}