mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
method refs: ensure inference from captured return type (IDEA-145152)
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
import java.util.stream.Stream;
|
||||
class Test {
|
||||
|
||||
void foo(final Stream<StubElement<?>> inStream){
|
||||
inStream.map(StubElement::getPsi)
|
||||
.map(s -> s.length());
|
||||
}
|
||||
|
||||
class StubElement<T extends String> {
|
||||
T getPsi() {return null;}
|
||||
}
|
||||
}
|
||||
+4
@@ -426,6 +426,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testCapturedReturnTypeOfMethodReference() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user