Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / gtest-063.cs
1 using System;
2
3 public class Test
4 {
5         public static int IndexOf (Array array, object value)
6         {
7                 // This is picking the non-generic version.
8                 return IndexOf (array, value, 0, array.Length);
9         }
10
11         public static int IndexOf (Array array, object value, int startIndex, int count)
12         {
13                 return 2;
14         }
15
16         public static int IndexOf<T> (T[] array, T value, int startIndex, int count)
17         {
18                 return 1;
19         }
20 }
21
22 class X
23 {
24         public static int Main ()
25         {
26                 Test test = new Test ();
27                 string[] array = new string [] { "Hello" };
28
29                 int result = Test.IndexOf (array, array);
30                 if (result != 2)
31                         return 1;
32
33                 string hello = "Hello World";
34                 // This is picking the generic version.
35                 result = Test.IndexOf (array, hello, 1, 2);
36                 if (result != 1)
37                         return 2;
38
39                 return 0;
40         }
41 }