Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-anon-165.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1355207e7ab686bc6ddb96bae5efa7acd7feb59a (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
26
27
28
29
30
using System;

interface IA
{
}

class C : IA
{
	void Foo<T> () where T : class, IA
	{
		Func<T, T> m = l => {
			T i = default (T);
			if (l == i) {
				Func<T> m2 = () => i;
				m2 ();
			}
			
			return i;
		};
		
		m (null);
	}
	
	public static int Main ()
	{
		var c = new C ();
		c.Foo<C> ();
		return 0;
	}
}