Update pipeline-netcore-runtime.yml
[mono-project.git] / mcs / tests / gtest-253.cs
blob84cf74295189ceb346f95aae24de3a4b4a975f8e
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 public static void Main ()
41 Extensible<int> ext = new Extensible<int> ();
42 ExtensibleTester<Extensible<int>> tester = new ExtensibleTester<Extensible<int>> (ext);
43 tester.Direct ();