// "Replace lambda with method reference" "true-preview" class NonStaticInner3 { class Foo { Foo(Integer i) {} Foo() {} } interface I1 { X m(int i); } interface I2 { X m(); } interface I3 { X m(NonStaticInner3 rec, int i); } interface I4 { X m(NonStaticInner3 rec); } { I1 b1 = Foo::new; I2 b2 = () -> new Foo(); } { I3 b1 = (rec, i) -> rec.new Foo(i); I4 b2 = (rec) -> rec.new Foo(); } }