/* * @test /nodynamiccopyright/ * @bug 8019480 * @summary Javac crashes when method is called on a type-variable receiver from lambda expression * @author Maurizio Cimadamore * @compile/fail/ref=T8019480.out -XDrawDiagnostics T8019480.java */ import java.util.*; class T8019480 { interface Predicate { void m(T t); } interface Stream { void forEach(Predicate pt); } void test(U current, Stream stream) { List list3 = new ArrayList<>(); stream.forEach(i -> list3.add(current.clone())); } }