summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0815-7.cs
blob: af3d10f8c6c370899609d93bd528f2d509f7d065 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// CS0815: An implicitly typed local variable declaration cannot be initialized with `void'
// Line: 8
// Compiler options: -langversion:experimental

class X
{
	public static void Main ()
	{
		Foo (out var x = Main ());
	}

	static void Foo (out int i)
	{
		i = 0;
	}
}