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

26 lines
627 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8013222
* @summary Javac issues spurious raw type warnings when lambda has implicit parameter types
* @compile/fail/ref=NoWarnOnImplicitParams.out -Xlint:rawtypes -Werror -XDrawDiagnostics NoWarnOnImplicitParams.java
*/
import java.util.List;
class NoWarnOnImplicitParams {
public void testRawMerge(List<String> ls) {
R12 r12_1 = l->"Foo";
R12 r12_2 = (List l)->"Foo";
}
interface R1 {
Object m(List<String> ls);
}
@SuppressWarnings("rawtypes")
interface R2 {
String m(List l);
}
interface R12 extends R1, R2 {}
}