Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-505.cs
1 using System;
2 using System.Collections.Generic;
3
4 class C
5 {
6         static int Test (List<int> arg)
7         {
8                 return 10;
9         }
10
11         static int Test (string arg)
12         {
13                 return 9;
14         }
15
16         static int Test (int arg)
17         {
18                 return 8;
19         }
20
21         static R Method<T, R> (IEnumerable<T> t, Func<T, R> a)
22         {
23                 return a (default (T));
24         }
25
26         static R Method2<T, R> (IEnumerable<T> t, Func<List<T>, R> a)
27         {
28                 return a (default (List<T>));
29         }
30
31         public static int Main ()
32         {
33                 if (Method (new int[] { 1 }, Test) != 8)
34                         return 1;
35
36                 if (Method2 (new int[] { 1 }, Test) != 10)
37                         return 2;
38
39                 return 0;
40         }
41 }