class Test { static Iterable map(Mapper mapper) { return null; } static void test() { Integer next = map(String::length).iterator().next(); Integer next1 = map(Test::length).iterator().next(); } public static T length(T s) { return null; } public static int length(String s) { return 0; } } interface Mapper { U map(T t); }