getTypeOfNumberExpression function

Type getTypeOfNumberExpression(
  1. Type left,
  2. Type right
)

Implementation

Type getTypeOfNumberExpression(Type left, Type right) {
  if (left != right) {
    //One of them has to be decimal => whole expr is decimal
    return Decimal;
  }
  return left;
}