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

gtest-448.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 012549c8afbf755ecc138d83dcccf2110eb61cbe (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
41
42
43
44
45
46
47
48
49
50
51
using System;
using System.Collections.Generic;

interface I<T> : I2<T>, IEnumerable<T>
{
}

interface I2<T2>
{
	void Foo<U> (IEnumerable<U> list) where U : T2;
}

class Impl<T> : I<T>
{
	public void Foo<U> (IEnumerable<U> list) where U : T
	{
	}
	
	public IEnumerator<T> GetEnumerator ()
	{
		return null;
	}
	
	System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator ()
	{
		return null;
	}
}

class A<K>
{
	public I<K> Value = new Impl<K> ();
}

class Test<TT> : A<TT>
{
	public void Foo ()
	{
		var a = new Test<TT> ();
		a.Value.Foo (Value);
	}
}

class M 
{
	public static void Main ()
	{
		new Test<ulong> ().Foo ();
	}
}