void (@NotNull ASTNode child, @NotNull TreeElement newElement) { if (ElementType.EXPRESSION_BIT_SET.contains(child.getElementType()) && !ElementType.EXPRESSION_BIT_SET.contains(newElement.getElementType())) { throw new IncorrectOperationException("Expression expected; got: " + newElement.getElementType()); } super.replaceChildInternal(child, newElement); }