class MyTest { MyTest() { } interface I { MyTest m(); } static void test(I s) { s.m(); } public static void main(String[] args) { I s = MyTest::new; s.m(); test(MyTest::new); } } class MyTest1 { MyTest1(Object o) { } MyTest1(Number n) { } interface I { MyTest1 m(Object o); } static void test(I s, Object arg) { s.m(arg); } public static void main(String[] args) { I s = MyTest1::new; s.m(""); test(MyTest1::new, ""); } } class MyTest2 { MyTest2(X x) { } interface I { MyTest2 m(Z z); } static void test(I s, Y arg) { s.m(arg); } public static void main(String[] args) { I s = MyTest2::new; s.m(""); test(MyTest2::new, ""); } } class MyTest3 { MyTest3(X x) { } interface I { MyTest3 m(Z z); } static void test(I s) { } public static void main(String[] args) { I s = MyTest3::new; test(MyTest3::new); } }