2002-07-17 Piers Haken <piersh@friskit.com>
[mono.git] / mcs / tests / test-99.cs
1 using System;
2 class X {
3         enum A : int {
4                 a = 1, b, c
5         }
6         
7         static int Main ()
8         {
9                 int v = 1;
10                 object foo = (v + A.a);
11                 object foo2 = (1 + A.a);
12
13                 if (foo.GetType ().ToString () != "X+A"){
14                         Console.WriteLine ("Expression evaluator bug in E operator + (U x, E y)");
15                         return 1;
16                 }
17                 
18                 if (foo2.GetType ().ToString () != "X+A"){
19                         Console.WriteLine ("Constant folder bug in E operator + (U x, E y)");
20                         return 2;
21                 }
22
23                 return 0;
24         }
25 }