mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
workaround for opened captures (IDEA-132717)
This commit is contained in:
@@ -1395,7 +1395,8 @@ public class InferenceSession {
|
||||
}
|
||||
|
||||
public PsiType substituteWithInferenceVariables(PsiType type) {
|
||||
return myInferenceSubstitution.substitute(type);
|
||||
final PsiType substituted = myInferenceSubstitution.substitute(type);
|
||||
return isProperType(substituted) ? type : substituted;
|
||||
}
|
||||
|
||||
public InferenceSession findNestedCallSession(PsiExpression arg) {
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import java.util.*;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
abstract class Example {
|
||||
abstract <E> Optional<E> findById(Class<E> type);
|
||||
void main(Stream<Class<? extends String>> stream) {
|
||||
stream.map(this::findById).map(Optional::get);
|
||||
}
|
||||
}
|
||||
@@ -326,6 +326,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testEnsureThatCapturedWildcardsAreNotOpenWithoutAnyReason() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user