private static void checkExpression(AnnotationHolder holder, @NotNull XPathExpression expression) {
    final XPathType expectedType = ExpectedTypeUtil.getExpectedType(expression);
    final XPathType opType = ExpectedTypeUtil.mapType(expression, expression.getType());
    if (!XPathType.isAssignable(expectedType, opType)) {
      holder.newAnnotation(HighlightSeverity.ERROR,
                           XPathBundle.message("annotator.error.expected.type.got", expectedType.getName(), opType.getName())).create();
    }
  }
private static void checkExpression(AnnotationHolder holder, @NotNull XPathExpression expression)