summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0165-54.cs
blob: 54b151bab4609d479183e75fe3086b77a56f95f4 (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
// CS0165: Use of unassigned local variable `res'
// Line: 23

class A
{
	public B b;
}

class B
{
	public void Foo (int arg)
	{
	}
}

class X
{
	public static void Main ()
	{
		A a = null;
		int res;
		a?.b.Foo(res = 3);
		System.Console.WriteLine (res);
	}
}