[java] [inference] fix explicit type lambda pertinent to applicability check (IDEA-279477)

GitOrigin-RevId: f5249362b724b60a4cac5d3856f03f61743d7266
This commit is contained in:
Anna Kozlova
2021-10-04 16:13:22 +00:00
committed by intellij-monorepo-bot
parent 8b9d0c44be
commit 8e5bc65c2a
3 changed files with 25 additions and 16 deletions
@@ -0,0 +1,21 @@
import java.io.InputStream;
import java.util.function.Function;
import java.util.function.Supplier;
class MyTest {
public static <W> void m(Class<W> targetType, Supplier<InputStream> upstream) {
Supplier<Supplier<W>> downstream = mapping(
(InputStream is) -> () -> readValue(is, targetType));
}
public static <T,U> Supplier<U> mapping(Function<? super T, ? extends U> mapper) {
return null;
}
public static <W> W readValue(InputStream stream, Class<W> targetType) {
return null;
}
}