void (XPathBinaryExpression o, XPath2Type... applicableTypes) { final XPathExpression lOperand = o.getLOperand(); assert lOperand != null; final XPathType leftType = XPath2Type.mapType(lOperand.getType()); for (XPath2Type applicableType : applicableTypes) { if (XPathType.isAssignable(applicableType, leftType)) { return; } } myHolder.newAnnotation(HighlightSeverity.ERROR, XPathBundle.message("annotator.error.operator.cannot.be.applied.to.expressions.type", o.getOperationSign(), leftType.getName())).create(); }