summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0165-48.cs
blob: 166fb5474331091971bfe4f52a19d3a263f18b28 (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
// CS0165: Use of unassigned local variable `v'
// Line: 19

using System;

class X
{
	int this [int v] {
		get {
			return 1;
		}
		set {			
		}
	}

	public static void Main ()
	{
		int v;
		X x = null;

		var r = x?[v = 2];
		Console.WriteLine (v);
	}
}