XPathType (boolean symmetric) { myFixture.configureByFile(getTestFileName() + ".xpath2"); final XPathExpression expression = getExpression(); // all these cases must be green myFixture.checkHighlighting(); if (symmetric && expression instanceof XPathBinaryExpression expr) { if (expr.getLOperand().getType() != expr.getROperand().getType()) { myFixture.configureByText(XPathFileType.XPATH2, expr.getROperand().getText() + " " + expr.getOperationSign() + " " + expr.getLOperand().getText()); assertEquals(getExpression().getType(), expression.getType()); myFixture.checkHighlighting(); } } final XPathType type = expression.getType(); if (type instanceof XPath2SequenceType) { return ((XPath2SequenceType)type).getType(); } return type; }