Java: accept more patterns (IJ-CR-144289)

GitOrigin-RevId: c0692f8c924b32988ec98aae86c1ad9b466cb45a
This commit is contained in:
Bas Leijdekkers
2024-09-23 14:42:56 +02:00
committed by intellij-monorepo-bot
parent b847b27f2c
commit c3189981f6
2 changed files with 13 additions and 2 deletions

View File

@@ -231,7 +231,7 @@ public class EqualsWhichDoesntCheckParameterClassInspection extends BaseInspecti
.map(PsiSwitchLabelStatementBase::getCaseLabelElementList)
.filter(Objects::nonNull)
.flatMap(list -> Arrays.stream(list.getElements()))
.anyMatch(element -> element instanceof PsiTypeTestPattern);
.anyMatch(element -> element instanceof PsiPrimaryPattern);
if (checksType) makeChecked();
}