[Mono.Profiler.Log] Check MLPD version when reading header
[mono.git] / mcs / tests / test-935.cs
1 using System;
2 using System.Threading.Tasks;
3 using System.Linq.Expressions;
4
5 public static class Program
6 {
7         public delegate void DelegateVoid (int arg);
8         public delegate int DelegateInt (string arg);
9
10         public static int Main () 
11         { 
12                 Foo (Bar);
13
14                 TT (null);
15                 NN (0);
16                 NN2 (1);
17                 Complex (null);
18                 MM (1);
19                 MM ((byte) 1);
20                 DecimalRule (() => (byte) 1);
21                 return 0;
22         }
23
24         static void TT (Task<string> a)
25         {
26         }
27
28         static void TT (Task<object> b)
29         {
30                 throw new ApplicationException ("wrong overload");
31         }
32
33         static void NN (sbyte a)
34         {
35         }
36
37         static void NN (uint? b)
38         {
39                 throw new ApplicationException ("wrong overload");
40         }
41
42         static void NN2 (sbyte? a)
43         {
44         }
45
46         static void NN2 (uint? b)
47         {
48                 throw new ApplicationException ("wrong overload");
49         }
50
51         public static void Bar (int arg) 
52         {
53         }
54
55         public static int Bar (string arg)
56         { 
57                 return  2;
58         }
59
60         public static void Foo (DelegateVoid input)
61         {
62                 throw new ApplicationException ("wrong overload");
63         }
64
65         public static void Foo (DelegateInt input)
66         {
67         }
68
69         static void Complex (Expression<Func<Task<short>>> arg)
70         {
71         }
72
73         static void Complex (Expression<Func<Task<ulong>>> arg)
74         {
75                 throw new ApplicationException ("wrong overload");
76         }
77
78         static void MM (double f)
79         {
80         }
81
82         static void MM (double? f)
83         {
84                 throw new ApplicationException ("wrong overload");
85         }
86
87     static void DecimalRule (Func<int> i)
88     {
89     }
90
91     static void DecimalRule (Func<decimal?> i)
92     {
93         throw new ApplicationException ("wrong overload");
94     }
95 }