Add a new test that we fail to pass
[mono.git] / mcs / tests / test-28.cs
1 class X {
2         int v1, v2;
3         
4         int this [int a] {
5                 get {
6                         if (a == 0)
7                                 return v1;
8                         else
9                                 return v2;
10                 }
11
12                 set {
13                         if (a == 0)
14                                 v1 = value;
15                         else
16                                 v2 = value;
17                 }
18         }
19
20         static int Main ()
21         {
22                 X x = new X ();
23                 int b;
24
25                 x [1] = x [0] = 1;
26                 if (x.v1 != 1)
27                         return 1;
28
29                 if (x [0] != 1)
30                         return 2;
31
32                 return 0;
33                 
34         }
35 }