mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 21:11:28 +07:00
java inference: tolerate raw upper bound (IDEA-229998)
GitOrigin-RevId: 90a888a80d9bd304fa908e5ae10a52ecc639752d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
50c060dd5d
commit
8ccd8d71e4
@@ -133,7 +133,7 @@ public class StrictSubtypingConstraint implements ConstraintFormula {
|
||||
|
||||
if (SClass == null) return false;
|
||||
|
||||
if (((PsiClassType)myT).isRaw()) {
|
||||
if (((PsiClassType)myT).isRaw() || myCapture && sType.isRaw()) {
|
||||
return InheritanceUtil.isInheritorOrSelf(SClass, CClass, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import java.util.List;
|
||||
class MyTest {
|
||||
void m(List<? extends Bar> bars) {
|
||||
n(bars.get(0));
|
||||
bars.forEach(b -> n(b));
|
||||
bars.forEach(MyTest::n);
|
||||
}
|
||||
private static <T> void n(Bar<T> bar) { }
|
||||
private static class Bar<T> { }
|
||||
}
|
||||
@@ -205,9 +205,8 @@ public class GraphInferenceHighlightingTest extends LightDaemonAnalyzerTestCase
|
||||
public void testNotInferredVarShouldNotBeUsedForInferenceJava10() { doTest(); }
|
||||
public void testJavac8UnCaptureBug() { doTest(); }
|
||||
public void testLambdaInConditional() { doTest(); }
|
||||
public void testTopLevelParentNoParameters() {
|
||||
doTest();
|
||||
}
|
||||
public void testTopLevelParentNoParameters() { doTest(); }
|
||||
public void testRawTypeOnTheRight() { doTest(); }
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
|
||||
Reference in New Issue
Block a user