Merge pull request #495 from nicolas-raoul/fix-for-issue2907-with-no-formatting-changes
[mono.git] / mcs / tests / gtest-271.cs
1 using System;
2 using System.Collections;
3 using System.Collections.Generic;
4
5 public class Qux<X,V> : IEnumerable<V>
6         where V : IComparable<V>
7 {
8         public IEnumerator<V> GetEnumerator()
9         {
10                 yield break;
11         }
12
13         IEnumerator IEnumerable.GetEnumerator()
14         {
15                 yield break;
16         }
17 }
18
19 public class Foo<X,V> : Qux<X,V>
20         where V : IComparable<V>
21 {
22 }
23
24 public class Test<T> : IComparable<Test<T>>
25 {
26         public int CompareTo (Test<T> t)
27         {
28                 return 0;
29         }
30 }
31
32 class X
33 {
34         public static void Main ()
35         {
36                 Foo<X,Test<X>> foo = new Foo<X,Test<X>> ();
37                 foreach (Test<X> test in foo)
38                         ;
39         }
40 }