blob: 8b119dea28b493f2be2d529c818fe571aa30c2a1 [file] [edit]
/**
* @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> {
T m(T s);
}
static <T> SAM<T> infmethod(SAM<T> t) { return t; }
public static void meth() {
SAM<Object> s = infmethod(int::new);
s.m();
}
}