RFR(s): 8152617 add missing wildcards to Optional or() and flatMap()
spliterator at gmail.com
Fri Oct 7 20:02:33 UTC 2016
2016-10-07 21:42 GMT+02:00 Michael Nascimento <misterm at gmail.com>:
> Doesn't work, as Stuart has noted (s'marks, as far as I know your
> explanation is 100% correct). Nested generics == pain :-(
sorry for being obtrusive. What exactly doesn't work?
Optional<Integer> oi = Optional.empty();
Function<Number, Optional<StringBuilder>> fm = n -> Optional.empty();
Optional<CharSequence> ocs = oi.flatMap(fm);
work's for me (on 1.8.0_51). Sorry, I'm just trying to understand.
More information about the core-libs-dev