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

gtest-589.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4599fe2fbd653fb579344188393a2cef08feb668 (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
31
32
33
34
35
36
37
38
39
40
using System;

public class Z : IGenericInterface<Z>
{
	public Z Start ()
	{
		return this;
	}

	Z IGenericInterface<Z>.Start ()
	{
		throw new ApplicationException ();
	}
}

public interface IGenericInterface<T>
{
	T Start ();
}

public class A<T> where T : Z, IGenericInterface<int> 
{
	public void SomeOperation (T t)
	{
		t.Start ();
	}
}

public class C : Z, IGenericInterface<int> 
{
	int IGenericInterface<int>.Start ()
	{
		throw new NotImplementedException ();
	}

	public static void Main ()
	{
		new A<C> ().SomeOperation (new C ());
	}
}