+ //
+ // handle "E operator - (E x, U y)"
+ // handle "E operator - (Y y, E x)"
+ // handle "U operator - (E x, E y)"
+ //
+ wrap_as = null;
+ if (left is EnumConstant){
+ if (right is EnumConstant){
+ if (left.Type != right.Type) {
+ Binary.Error_OperatorCannotBeApplied (loc, "-", left.Type, right.Type);
+ return null;
+ }
+
+ wrap_as = TypeManager.EnumToUnderlying (left.Type);
+ right = ((EnumConstant) right).Child.ToType (wrap_as, loc);
+ if (right == null)
+ return null;
+
+ left = ((EnumConstant) left).Child.ToType (wrap_as, loc);
+ if (left == null)
+ return null;
+ }
+ else {
+ right = right.ToType (((EnumConstant) left).Child.Type, loc);
+ if (right == null)
+ return null;
+
+ wrap_as = left.Type;
+ }
+ } else if (right is EnumConstant){
+ left = left.ToType (((EnumConstant) right).Child.Type, loc);
+ if (left == null)
+ return null;
+
+ wrap_as = right.Type;
+ }
+
+ DoConstantNumericPromotions (ec, oper, ref left, ref right, loc);