mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
new inference: nothing should be cached during overload resolution (IDEA-136759)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class Test {
|
||||
|
||||
public Long getKey() {
|
||||
return 0L;
|
||||
}
|
||||
|
||||
public static void main(Stream<Test> stream) {
|
||||
stream.map(s -> Inner.of(Test::getKey, s));
|
||||
}
|
||||
|
||||
public static final class Inner<K> {
|
||||
public static <T> Inner<T> of(final Object key, final Test value) {return null;}
|
||||
public static <T> Inner<T> of(final Function< T, Long> keyMapper, final Test value) {return null;}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class Test {
|
||||
|
||||
public Long getKey() {
|
||||
return 0L;
|
||||
}
|
||||
|
||||
public static void main(Stream<Test> stream) {
|
||||
stream.map(s -> Inner.of(Test::get<ref>Key, s));
|
||||
}
|
||||
|
||||
public static final class Inner<K> {
|
||||
public static <T> Inner<T> of(final Object key, final Test value) {return null;}
|
||||
public static <T> Inner<T> of(final Function< T, Long> keyMapper, final Test value) {return null;}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user