java method reference inference: keep additional inference variables when second search is not possible (IDEA-252839)

GitOrigin-RevId: 358b0408221aaf6e51dbf87867ae8f33ba0d0fde
This commit is contained in:
Anna Kozlova authored and intellij-monorepo-bot committed 2020-10-28 13:47:13 +00:00
1 parent 2c2bce389a
commit 9970306c8f
3 files changed
+23 -1

No files matched your search

@@ -0,0 +1,16 @@
import java.util.*;
interface Foo<T> {
static <E> Foo<E> of(E e1) {
return null;
}
T get(int i);
}
class MainTest {
{
Optional.of("one,two").map(Foo::<String>of).get().get(0).split(",");
Optional.of("one,two").map(Foo::of).get().get(0).split(",");
}
}