lambda inference: conditional expressions in returns (IDEA-174301)

skip conditionals and parenthesis during find top expression
This commit is contained in:
Anna Kozlova
2017-06-13 16:12:45 +03:00
parent 07ad2207df
commit fb928f72c6
3 changed files with 24 additions and 0 deletions
@@ -0,0 +1,20 @@
import java.util.function.Function;
interface Container<T> {
static <Q> Function<Q, Container<Q>> typeTester(Container<Q> c, final Container<Q> one) {
return funcWithString(input -> c.match(aa -> (true ? (zero()) : one)));
}
static <S> Function<S, Container<S>> funcWithString(Function<S, Container<S>> f) {
return null;
}
default <R> R match(Function<T, R> f) {
return null;
}
static <T> Container<T> zero() {
return null;
}
}