method refs: correct condition on receiver type substitution (IDEA-129905)

This commit is contained in:
Anna Kozlova
2014-09-16 20:11:42 +04:00
parent 8979580a62
commit f1b12f6025
4 changed files with 23 additions and 5 deletions
@@ -0,0 +1,11 @@
import java.util.concurrent.ConcurrentMap;
import java.util.function.Function;
import java.util.stream.Stream;
abstract class Test {
public void foo(final ConcurrentMap<String, String> pMap) {
map(pMap::get);
}
abstract <R> Stream<R> map(Function<Object, R> mapper);
}
@@ -312,6 +312,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
doTest();
}
public void testReceiverTypeSubstitution() throws Exception {
doTest();
}
private void doTest() {
doTest(false);
}