java inference: stop walkUp in assignment context inside method call chain (IDEA-217928)

GitOrigin-RevId: 79ac2370cd302d7e38d029e065ff4a28ed8709a4
This commit is contained in:
Anna Kozlova
2019-07-11 23:22:40 +03:00
committed by intellij-monorepo-bot
parent 6ebf3349dc
commit bd882f2a97
3 changed files with 23 additions and 1 deletions
@@ -0,0 +1,20 @@
import java.util.*;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.Stream;
class MyTest {
void foo(Stream<Map.Entry<Object, Object>> stream) {
Supplier<Map<Object, Object>> s = null;
(s = () -> stream
.collect(Collectors.toMap(
entry -> entry.getKey(),
Map.Entry::getValue
))).get();
((Supplier<Map<Object, Object>>) () -> stream
.collect(Collectors.toMap(
entry -> entry.getKey(),
Map.Entry::getValue
))).get();
}
}