mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-17 20:11:25 +07:00
inference: skip lambda content and all its dependants when lambda type parameter type is calculated
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class Test {
|
||||
<K> void foo(Function<String, K> f1) {}
|
||||
|
||||
<T> Stream<T> bar(T ts) {
|
||||
return null;
|
||||
}
|
||||
|
||||
void f(){
|
||||
foo(y -> bar(y.to<caret>String()).map(a -> a.length()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
class StreamMainSimplified {
|
||||
public static void main(Optional<Map.Entry<Integer, String>> first) {
|
||||
String s1 = first.map((e) -> e.getV<caret>alue()).orElse("").substring(9);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user