2 // Tests the resulting value of operator + (U x, E y)
3 // as well as implicit conversions in the above operator.
16 public static int Main ()
19 object foo
= (v
+ A
.a
);
20 object foo2
= (1 + A
.a
);
22 if (foo
.GetType ().ToString () != "X+A"){
23 Console
.WriteLine ("Expression evaluator bug in E operator + (U x, E y)");
27 if (foo2
.GetType ().ToString () != "X+A"){
28 Console
.WriteLine ("Constant folder bug in E operator + (U x, E y)");
32 // Now try the implicit conversions for underlying types in enum operators
34 short s
= (short) (Test
.A
+ b
);
36 const int e
= A
.b
+ 1 - A
.a
;
39 // Make sure that other operators still work