mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 08:09:39 +07:00
inference: don't remember captured wildcard with non-proper bound (IDEA-180042)
later check could fail e.g. if bound was created inside one of nested session
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@@ -54,3 +55,13 @@ class TestWithNonProperTypeBeforeCapture {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class TestWithNonPropertTypeBeforeCaptureInMethodCall {
|
||||
private <K, V> void test(Stream<Map.Entry<K, V>> stream, BiFunction<K, V, ?> entryMapper) {
|
||||
stream.map(createToStringMapper(entryMapper));
|
||||
}
|
||||
|
||||
private <K, V> Function<? super Map.Entry<K, V>, String> createToStringMapper(BiFunction<K, V, ?> mapper) {
|
||||
return k -> toString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user