interface SAM { String m(MethodReference f, F f1); } class F { String getX() { return null; } } class MethodReference { static void test() { SAM s = (stringMethodReference, f1) -> f1.getX(); } }