summaryrefslogtreecommitdiff
path: root/mcs/tests/test-655.cs
blob: e7fc496e30cd906bc867f6389298d203e349c8a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
public class D
{
	byte v;

	byte this [int idx] {
		get {
			return v;
		}
		set {
			v = value;
		}
	}

	public static int Main ()
	{
		D d = new D ();
		byte b = 1;
		d [0] += 1;
		d [0] += b;
		if (d [0] != 2)
			return 1;

		return 0;
	}
}