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

gtest-variance-14.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c469afc9d64446ab017df539ee64b937a137db6b (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
using System;

public class A
{
}

public class B : A
{
}

public class C : A
{
	delegate void D<in T> (T t);
	delegate T D<out T, U> (U u);
	
	public static int Main ()
	{
		D<string> d_a = null;
		D<object> d_b = (D<object>) d_a;

		D<A, string> d2_a = null;
		D<B, string> d2_b = (D<B, string>) d2_a;
		D<C, string> d2_c = (D<C, string>) d2_a;

		return 0;
	}
}