[w32file] Move MonoIO.Find{First,Next,Close} to managed
[mono.git] / mcs / tests / gtest-253.cs
1 using System;
2 using SCG = System.Collections.Generic;
3
4 public interface IExtensible<T>
5 {
6         void AddAll<U> (SCG.IEnumerable<U> items)
7                 where U : T;
8 }
9
10 public abstract class CollectionValueTester<R,S>
11         where R : IExtensible<S>
12 {
13         protected R collection;
14 }
15
16 public class ExtensibleTester<U> : CollectionValueTester<U,int>
17         where U : IExtensible<int>
18 {
19         public ExtensibleTester (U u)
20         {
21                 this.collection = u;
22         }
23
24         public void Direct()
25         {
26                 collection.AddAll<int> (new int[] { });
27         }
28 }
29
30 public class Extensible<V> : IExtensible<V>
31 {
32         public void AddAll<W> (SCG.IEnumerable<W> items)
33                 where W : V
34         { }
35 }
36
37 class X
38 {
39         public static void Main ()
40         {
41                 Extensible<int> ext = new Extensible<int> ();
42                 ExtensibleTester<Extensible<int>> tester = new ExtensibleTester<Extensible<int>> (ext);
43                 tester.Direct ();
44         }
45 }