Merge pull request #5636 from BrzVlad/fix-xmm-scan
[mono.git] / mcs / tests / gtest-486.cs
1 using System;
2 using System.Collections.Generic;
3
4 interface IMyCollection<T> : ICollection<T> {
5
6 }
7
8 class MyCollection<T> : IMyCollection<T> {
9
10     public void AddRange(IMyCollection<T> items) {
11     }
12
13     public void AddRange(IEnumerable<T> items) {
14     }
15
16     public int Count { get { return 0; } }
17
18     public bool IsReadOnly { get { return false; } }
19
20     public void Add(T item) { }
21
22     public void Clear() { }
23
24     public bool Contains(T item) { return false; }
25
26     public void CopyTo(T[] a, int i) { }
27
28     public bool Remove(T item) { return false; }
29
30     public IEnumerator<T> GetEnumerator() { return null; }
31
32     System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return null; }
33
34 }
35
36 class P {
37
38     static protected MyCollection<String> foo = new MyCollection<String>();
39
40     static protected MyCollection<String> bar = new MyCollection<String>();
41
42     static public MyCollection<String> IgnoreTokens {
43         get {
44             if (foo.Count == 0)
45                 foo.AddRange(bar);  // false error on Mono 2.0 and 2.4: The call is ambiguous between...
46             return foo;
47         }
48     }
49
50     public static void Main()
51         {
52     }
53
54 }