/** * @test /nodynamiccopyright/ * @bug 8139245 * @summary compiler crashes with exception on int:new method reference and generic method inference * @compile/fail/ref=MethodRefIntColonColonNewTest.out -XDrawDiagnostics MethodRefIntColonColonNewTest.java */ public class MethodRefIntColonColonNewTest { interface SAM { T m(T s); } static SAM infmethod(SAM t) { return t; } public static void meth() { SAM s = infmethod(int::new); s.m(); } }