Cannot infer type argument(s) for <R> map(Function<? super T,? extends R>) in some specific situation
I have confirmed, that this is a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=512486. It has been declared as resolved in 4.6.3. I'll confirm this when stable release is available.
I just checked with Eclipse IDE for Java Developers Version: Mars Release (4.5.0) Build id: 20150621-1200 and the code worked well for me. It may have been introduced in the 4.6 version.