2010-05-13 Rodrigo Kumpera <rkumpera@novell.com>
[mono-project.git] / mcs / tests / gtest-110.cs
blob012bc2eb2fd7a1405c92f05bff52796d153106c0
1 using System;
3 public interface IList<R>
5 int Map<S> (S item);
8 public class List<T> : IList<T>
10 public int Map<U> (U item)
12 return 1;
16 public class SpecialList<V> : IList<V>
18 public int Map<W> (W item)
20 return 2;
24 class X
26 static int Main ()
28 IList<int> list = new List<int> ();
29 int result = list.Map ("Hello");
30 if (result != 1)
31 return 1;
33 IList<int> list2 = new SpecialList<int> ();
34 int result2 = list2.Map ("World");
35 if (result2 != 2)
36 return 2;
38 return 0;