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>2010-04-27 16:33:26 +0400
committerMarek Safar <marek.safar@gmail.com>2010-04-27 16:33:26 +0400
commitfc56acfaa23d3c2f7bc0914405a0aa2a7be2a2d0 (patch)
tree9a59ae3836b2a9ec42d55bc906f6bde87c31f0e2 /mcs/tests/gtest-486.cs
parent9ea478b7f796f8b3afc461afbe844b232052915c (diff)
New tests.
svn path=/trunk/mcs/; revision=156177
Diffstat (limited to 'mcs/tests/gtest-486.cs')
-rw-r--r--mcs/tests/gtest-486.cs54
1 files changed, 54 insertions, 0 deletions
diff --git a/mcs/tests/gtest-486.cs b/mcs/tests/gtest-486.cs
new file mode 100644
index 00000000000..20118125af3
--- /dev/null
+++ b/mcs/tests/gtest-486.cs
@@ -0,0 +1,54 @@
+using System;
+using System.Collections.Generic;
+
+interface IMyCollection<T> : ICollection<T> {
+
+}
+
+class MyCollection<T> : IMyCollection<T> {
+
+ public void AddRange(IMyCollection<T> items) {
+ }
+
+ public void AddRange(IEnumerable<T> items) {
+ }
+
+ public int Count { get { return 0; } }
+
+ public bool IsReadOnly { get { return false; } }
+
+ public void Add(T item) { }
+
+ public void Clear() { }
+
+ public bool Contains(T item) { return false; }
+
+ public void CopyTo(T[] a, int i) { }
+
+ public bool Remove(T item) { return false; }
+
+ public IEnumerator<T> GetEnumerator() { return null; }
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return null; }
+
+}
+
+class P {
+
+ static protected MyCollection<String> foo = new MyCollection<String>();
+
+ static protected MyCollection<String> bar = new MyCollection<String>();
+
+ static public MyCollection<String> IgnoreTokens {
+ get {
+ if (foo.Count == 0)
+ foo.AddRange(bar); // false error on Mono 2.0 and 2.4: The call is ambiguous between...
+ return foo;
+ }
+ }
+
+ public static void Main()
+ {
+ }
+
+}