[ilasm] Don't break arguments compatiblity
[mono-project.git] / mcs / tests / gtest-named-01.cs
blob7e465ad4b390f01f20a0d17228d3b653e4fd6573
1 using System;
3 static class C
5 public static int Test (this int a, int b = 5, string s = "")
7 return a * 3 + b;
10 static T Foo<T> (T t, int a)
12 return t;
15 static void Lambda (Func<int, int> a)
17 a (6);
20 public static int Main ()
22 if (2.Test () != 11)
23 return 1;
25 if (1.Test (b : 2) != 5)
26 return 2;
28 if (Foo ("n", a : 4) != "n")
29 return 3;
31 if (Foo (t : "x", a : 4) != "x")
32 return 4;
34 Lambda (a : (a) => 1);
36 // Hoisted variable
37 int var = 8;
38 Lambda (a : (a) => var);
40 Console.WriteLine ("ok");
41 return 0;