/* * @test /nodynamiccopyright/ * @bug 8029633 * @summary Raw inner class constructor ref should not perform diamond inference * @compile/fail/ref=MethodRefNewInnerRawTest.out -Werror -Xlint:unchecked -XDrawDiagnostics MethodRefNewInnerRawTest.java */ import java.util.function.*; class MethodRefNewInnerRawTest { class Inner1 {} class Inner2 {} Supplier s1 = MethodRefNewInnerRawTest.Inner1::new; Supplier s2 = MethodRefNewInnerRawTest.Inner2::new; Supplier.Inner1> s3 = MethodRefNewInnerRawTest.Inner1::new; Supplier.Inner2> s4 = MethodRefNewInnerRawTest.Inner2::new; static class Outer { class Inner3 {} Supplier> s5 = Outer.Inner3::new; } }