void (@NotNull PsiTypeCastExpression expression) { super.visitTypeCastExpression(expression); if (!isUnnecessaryPrimitiveNumericCast(expression)) { // equal types is caught by "Redundant type cast" inspection return; } final PsiTypeElement typeElement = expression.getCastType(); if (typeElement != null) { registerError(typeElement, expression.getOperand()); } }