Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / dtest-named-02.cs
1 using System;
2
3 public class Test
4 {
5         static int counter;
6
7         static int M1 ()
8         {
9                 if (counter != 2)
10                         throw new ApplicationException ();
11
12                 return counter++;
13         }
14
15         static int M2 ()
16         {
17                 if (counter != 3)
18                         throw new ApplicationException ();
19
20                 return counter++;
21         }
22
23         static dynamic M3 ()
24         {
25                 if (counter != 1)
26                         throw new ApplicationException ();
27
28                 return counter++;
29         }
30
31         static int Foo (int a, int b, int c)
32         {
33                 if (a != 2)
34                         return 1;
35
36                 if (b != 3)
37                         return 2;
38
39                 if (c != 1)
40                         return 3;
41
42                 return 0;
43         }
44
45         public static int Main ()
46         {
47                 counter = 1;
48                 return Foo (c: M3 (), a: M1 (), b: M2 ());
49         }
50 }