Author: marek
Date: 2007-09-05 10:47:37 -0400 (Wed, 05 Sep 2007)
New Revision: 85364

Added:
   trunk/mcs/tests/gtest-338.cs
Log:
New test.



Added: trunk/mcs/tests/gtest-338.cs
===================================================================
--- trunk/mcs/tests/gtest-338.cs        2007-09-05 14:46:35 UTC (rev 85363)
+++ trunk/mcs/tests/gtest-338.cs        2007-09-05 14:47:37 UTC (rev 85364)
@@ -0,0 +1,88 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+class Test {
+
+       static void Main ()
+       {
+               FooList<string> l = new FooList<string> ();
+               Foo<string> (l);
+       }
+
+       static void Foo<T> (IList<T> list)
+       {
+               ICollection coll = list as ICollection;
+               if (coll != null)
+                       Console.WriteLine (coll.Count);
+       }
+}
+
+public class FooList<T> : IList<T> {
+
+       public int IndexOf (T item)
+       {
+               throw new NotImplementedException ();
+       }
+
+       public void Insert (int index, T item)
+       {
+               throw new NotImplementedException ();
+       }
+
+       public void RemoveAt (int index)
+       {
+               throw new NotImplementedException ();
+       }
+
+       public T this [int index]
+       {
+               get { throw new NotImplementedException (); }
+               set { throw new NotImplementedException (); }
+       }
+
+       public void Add (T item)
+       {
+               throw new NotImplementedException ();
+       }
+
+       public void Clear ()
+       {
+               throw new NotImplementedException ();
+       }
+
+       public bool Contains (T item)
+       {
+               throw new NotImplementedException ();
+       }
+
+       public void CopyTo (T [] array, int arrayIndex)
+       {
+               throw new NotImplementedException ();
+       }
+
+       public bool Remove (T item)
+       {
+               throw new NotImplementedException ();
+       }
+
+       public int Count
+       {
+               get { throw new NotImplementedException (); }
+       }
+
+       public bool IsReadOnly
+       {
+               get { throw new NotImplementedException (); }
+       }
+
+       IEnumerator<T> IEnumerable<T>.GetEnumerator ()
+       {
+               throw new NotImplementedException ();
+       }
+
+       public IEnumerator GetEnumerator ()
+       {
+               throw new NotImplementedException ();
+       }
+}


Property changes on: trunk/mcs/tests/gtest-338.cs
___________________________________________________________________
Name: svn:eol-style
   + native

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to