eol
[mcs.git] / tests / gtest-253.cs
blob658dea9cbad8cc34289f78bc6d5565245602a517
1 using System;
2 using SCG = System.Collections.Generic;
4 public interface IExtensible<T>
6 void AddAll<U> (SCG.IEnumerable<U> items)
7 where U : T;
10 public abstract class CollectionValueTester<R,S>
11 where R : IExtensible<S>
13 protected R collection;
16 public class ExtensibleTester<U> : CollectionValueTester<U,int>
17 where U : IExtensible<int>
19 public ExtensibleTester (U u)
21 this.collection = u;
24 public void Direct()
26 collection.AddAll<int> (new int[] { });
30 public class Extensible<V> : IExtensible<V>
32 public void AddAll<W> (SCG.IEnumerable<W> items)
33 where W : V
34 { }
37 class X
39 static void Main ()
41 Extensible<int> ext = new Extensible<int> ();
42 ExtensibleTester<Extensible<int>> tester = new ExtensibleTester<Extensible<int>> (ext);
43 tester.Direct ();