blob: db287e839078e86e38b5f73e2d20513c04c75f5c (
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;
using System.Collections;
using System.Collections.Generic;
public class Qux<X,V> : IEnumerable<V>
where V : IComparable<V>
{
public IEnumerator<V> GetEnumerator()
{
yield break;
}
IEnumerator IEnumerable.GetEnumerator()
{
yield break;
}
}
public class Foo<X,V> : Qux<X,V>
where V : IComparable<V>
{
}
public class Test<T> : IComparable<Test<T>>
{
public int CompareTo (Test<T> t)
{
return 0;
}
}
class X
{
public static void Main ()
{
Foo<X,Test<X>> foo = new Foo<X,Test<X>> ();
foreach (Test<X> test in foo)
;
}
}
|