Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2007-09-05 18:47:37 +0400
committerMarek Safar <marek.safar@gmail.com>2007-09-05 18:47:37 +0400
commit0b5874e52736341e062a33a9feff3c8eef260c89 (patch)
tree6c269ce28d46599ffdac452d7ed24dae350e570c /mcs/tests/gtest-338.cs
parentc95f3b53fcf248a420bf51fa58089b6a5aece812 (diff)
New test.
svn path=/trunk/mcs/; revision=85364
Diffstat (limited to 'mcs/tests/gtest-338.cs')
-rw-r--r--mcs/tests/gtest-338.cs88
1 files changed, 88 insertions, 0 deletions
diff --git a/mcs/tests/gtest-338.cs b/mcs/tests/gtest-338.cs
new file mode 100644
index 00000000000..869c07b378b
--- /dev/null
+++ b/mcs/tests/gtest-338.cs
@@ -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 ();
+ }
+}