summaryrefslogtreecommitdiff
path: root/mcs/tests/test-interpolation-07.cs
blob: 81a8246505923d1159aee082e829da218e3c8fbf (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
using System;

class CloningTests
{
	static Action a;

	static void Do (Action cb)
	{
		cb ();
	}

	static void SetupBAD ()
	{
		int number = 0;
		Do(() => {
			a = () => Console.WriteLine ($"Number: {++number}");
		});
	}

	static void Main ()
	{
		SetupBAD ();
		a ();
	}
}