summaryrefslogtreecommitdiff
path: root/mcs/errors/cs8046.cs
blob: 3335e29c4b15e844a86df6cb35db53a04ea384bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// CS8046: An expression tree cannot contain a declaration expression
// Line: 11
// Compiler options: -langversion:experimental

using System;
using System.Linq.Expressions;

class C
{
	static void Main()
	{
		Expression<Func<bool>> e = () => Out (out int x);
	}

	static bool Out (out int value)
	{
		value = 3;
		return true;
	}
}