Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

31 lines
366 B
C#

using System;
class C
{
int value = 1;
public int this [int arg] {
get { return this.value; }
set { this.value = value + arg; }
}
public static int Main ()
{
C c = new C ();
dynamic d = c;
int index = 1;
var x = ++d[++index];
if (index != 2)
return 1;
if (c.value != 4)
return 2;
if (x != 2)
return 3;
return 0;
}
}