/* * @test /nodynamiccopyright/ * @bug 6650759 8078024 * @summary Inference of formal type parameter (unused in formal parameters) is not performed * @compile/fail/ref=T6650759m.out T6650759m.java -XDrawDiagnostics */ import java.util.*; class T6650759m { List m(List> ls) { return ls.get(0); } void test() { ArrayList> lli = new ArrayList>(); ArrayList li = new ArrayList(); li.add(2); lli.add(li); List ls = m(lli); //here ls.add("crash"); Integer i = li.get(1); } }