protected JExpression modifyResultOperation(JBinaryOperation op) {
JType lhsType = op.getLhs().getType();
JType rhsType = op.getRhs().getType();
if (lhsType != rhsType) {
// first widen binary op to encompass both sides, then add narrow cast
return new JCastOperation(op.getSourceInfo(), lhsType, new JBinaryOperation(op
.getSourceInfo(), widenType(lhsType, rhsType), op.getOp(), op.getLhs(), op.getRhs()));
}
return op;
}