Update dependencies from https://github.com/dotnet/arcade build 20190729.1 (#15881)
[mono-project.git] / mcs / tests / dtest-051.cs
blob5c9d432d8f0d76e1ff9ffbd60f5367c36b89191d
1 using System;
3 class C
5 int value = 1;
7 public int this [int arg] {
8 get { return this.value; }
9 set { this.value = value + arg; }
12 public static int Main ()
14 C c = new C ();
15 dynamic d = c;
16 int index = 1;
18 var x = ++d[++index];
20 if (index != 2)
21 return 1;
23 if (c.value != 4)
24 return 2;
26 if (x != 2)
27 return 3;
29 return 0;