java-topology/test/langtools/tools/javac/generics/6946618/T6946618b.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

21 lines
443 B
Java

/*
* @test /nodynamiccopyright/
* @bug 6946618
* @summary sqe test fails: javac/generics/NewOnTypeParm in pit jdk7 b91 in all platforms.
* @author mcimadamore
* @compile/fail/ref=T6946618b.out -XDrawDiagnostics T6946618b.java
*/
class T6946618b {
static class C<T> {
T makeT() {
return new T<>(); //error
}
}
static class D<S> {
C<S> makeC() {
return new C<>(); //ok
}
}
}