class Test { public void foo() { new A().f(Test::foo); } }