Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / dtest-051.cs
1 using System;
2
3 class C
4 {
5         int value = 1;
6         
7         public int this [int arg] {
8                 get { return this.value; }
9                 set { this.value = value + arg; }
10         }
11         
12         public static int Main ()
13         {
14                 C c = new C ();
15                 dynamic d = c;
16                 int index = 1;
17
18                 var x = ++d[++index];
19
20                 if (index != 2)
21                         return 1;
22                 
23                 if (c.value != 4)
24                         return 2;
25                 
26                 if (x != 2)
27                         return 3;
28                 
29                 return 0;
30         }
31 }