Revert "IJ-CR-102037 [java-inspections] IDEA-311705. Support type inference changes in Java 20 for foreach"

This reverts commit ea173dc1bc9794b1acb6fcc97b3539bbd87319cd.

GitOrigin-RevId: 6a0ecd9623a9cf1209b93e115e527a3579ea096d
This commit is contained in:
Mikhail Pyltsin
2023-02-03 00:32:36 +00:00
committed by intellij-monorepo-bot
parent 026f64952a
commit 6678de5817
2 changed files with 0 additions and 6 deletions
@@ -316,7 +316,6 @@ public final class JavaGenericsUtil {
PsiSubstitutor superClassSubstitutor = TypeConversionUtil.getClassSubstitutor(owner, aClass, substitutor);
if (superClassSubstitutor == null) return null;
PsiType itemType = superClassSubstitutor.substitute(typeParameter);
itemType = PsiUtil.captureToplevelWildcards(itemType, aClass);
return itemType == null ? PsiType.getJavaLangObject(manager, aClass.getResolveScope()) : itemType;
}
if (type instanceof PsiIntersectionType) {
@@ -214,11 +214,6 @@ public class DeconstructionInferenceTest extends LightJavaCodeInsightFixtureTest
int length = text.length();
}
}
public static void test2(List<Box<? extends String>> records) {
for (Box(var x ) : records) {
System.out.println(x.isEmpty());
}
}
}
""");
myFixture.enableInspections(new RawUseOfParameterizedTypeInspection());