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