@Override
        protected void checkExpression(final @NotNull XPathExpression expr) {
            if (ExpectedTypeUtil.isExplicitConversion(expr)) {
                final XPathExpression expression = ExpectedTypeUtil.unparenthesize(expr);
                assert expression != null;

                final XPathType convertedType = ((XPathFunctionCall)expression).getArgumentList()[0].getType();
                if (isSameType(expression, convertedType)) {
                    final XPathQuickFixFactory fixFactory = ContextProvider.getContextProvider(expression).getQuickFixFactory();
                    LocalQuickFix[] fixes = fixFactory.createRedundantTypeConversionFixes(expression);

                  final String message = XPathBundle.message("inspection.message.redundant.conversion.to.type", convertedType.getName());
                  addProblem(myManager.createProblemDescriptor(expression, message, myOnTheFly, fixes,
                                                               ProblemHighlightType.GENERIC_ERROR_OR_WARNING));
                } else if (CHECK_ANY) {
                    final XPathType expectedType = ExpectedTypeUtil.getExpectedType(expression);
                    if (expectedType == XPathType.ANY) {
                        final XPathQuickFixFactory fixFactory = ContextProvider.getContextProvider(expression).getQuickFixFactory();
                        LocalQuickFix[] fixes = fixFactory.createRedundantTypeConversionFixes(expression);

                      final String message = XPathBundle.message("inspection.message.redundant.conversion.to.type", expectedType.getName());
                      addProblem(myManager.createProblemDescriptor(expression, message, myOnTheFly, fixes,
                                                                   ProblemHighlightType.GENERIC_ERROR_OR_WARNING));
                    }
                }
            }
        }
@Override
        protected void checkExpression(final @NotNull XPathExpression expr)