Mark cast expressions as cheap if their underlying expressions are.
GITHUB_BREAKING_CHANGES=none
@@ -64,4 +64,9 @@ abstract class Cast extends Expression {
void doFormatInitialStatements(FormattingContext ctx) {
ctx.appendInitialStatements(expr());
}
+
+ @Override
+ public boolean isCheap() {
+ return expr().isCheap();
+ }
}
