void (@NotNull PsiInstanceOfExpression expression) { super.visitInstanceOfExpression(expression); if (!hasErrorResults()) HighlightUtil.checkInstanceOfApplicable(expression, myErrorSink); if (!hasErrorResults()) add(GenericsHighlightUtil.checkInstanceOfGenericType(myLanguageLevel, expression)); if (!hasErrorResults() && myLanguageLevel.isAtLeast(LanguageLevel.JDK_16) && // 5.20.2 Removed restriction on pattern instanceof for unconditional patterns (JEP 432, 440) (myLanguageLevel.isLessThan(LanguageLevel.JDK_21) && myLanguageLevel != LanguageLevel.JDK_20_PREVIEW)) { add(HighlightUtil.checkInstanceOfPatternSupertype(expression)); } }