/* * @test /nodynamiccopyright/ * @bug 8023549 * @summary Compiler emitting spurious errors when constructor reference type is inferred and explicit type arguments are supplied * @compile/fail/ref=T8023549.out -XDrawDiagnostics T8023549.java */ public class T8023549 { static class Foo { } interface Supplier { X make(); } interface ExtSupplier extends Supplier { } void m1(Supplier> sfs) { } void m2(Supplier> sfs) { } void m2(ExtSupplier> sfs) { } void test() { Supplier> sfs = Foo::new; m1(Foo::new); m2(Foo::new); } }