Merge pull request #4816 from BrzVlad/fix-remoting-exception
[mono.git] / mcs / tests / gtest-448.cs
1 using System;
2 using System.Collections.Generic;
3
4 interface I<T> : I2<T>, IEnumerable<T>
5 {
6 }
7
8 interface I2<T2>
9 {
10         void Foo<U> (IEnumerable<U> list) where U : T2;
11 }
12
13 class Impl<T> : I<T>
14 {
15         public void Foo<U> (IEnumerable<U> list) where U : T
16         {
17         }
18         
19         public IEnumerator<T> GetEnumerator ()
20         {
21                 return null;
22         }
23         
24         System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator ()
25         {
26                 return null;
27         }
28 }
29
30 class A<K>
31 {
32         public I<K> Value = new Impl<K> ();
33 }
34
35 class Test<TT> : A<TT>
36 {
37         public void Foo ()
38         {
39                 var a = new Test<TT> ();
40                 a.Value.Foo (Value);
41         }
42 }
43
44 class M 
45 {
46         public static void Main ()
47         {
48                 new Test<ulong> ().Foo ();
49         }
50 }
51