/** * Tries to simplify this node by simplifying the target expression and, if the expression is a * constant, applying the cast. * * @return The possibly simplified value of the expression. */ @Override public ExprNode evaluate() { assert isResolved(); expr = expr.evaluate(); return expr instanceof ConstNode ? ((ConstNode) expr).castTo(type) : this; }