//
// LAMESPEC:
//
- // void Foo (params int[]) is better than void Foo (int i = 0) for Foo ()
+ // void Foo (int i = 0) is better than void Foo (params int[]) for Foo ()
// void Foo (string[] s, string value = null) is better than Foo (string s, params string[]) for Foo (null) or Foo ()
//
if (cand_param.HasDefaultValue != best_param.HasDefaultValue)
- return !candidate_params;
+ return cand_param.HasDefaultValue;
if (cand_param.HasDefaultValue) {
++j;
--- /dev/null
+using System;
+
+class Test
+{
+ public static int M (bool b = false)
+ {
+ Console.WriteLine ("PASS");
+ return 0;
+ }
+
+ public static int M (params string[] args)
+ {
+ Console.WriteLine ("FAIL");
+ return 1;
+ }
+
+ public static int Main ()
+ {
+ return M ();
+ }
+}
</method>\r
</type>\r
</test>\r
+ <test name="gtest-optional-31.cs">\r
+ <type name="Test">\r
+ <method name="Int32 M(Boolean)" attrs="150">\r
+ <size>20</size>\r
+ </method>\r
+ <method name="Int32 M(System.String[])" attrs="150">\r
+ <size>20</size>\r
+ </method>\r
+ <method name="Int32 Main()" attrs="150">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
<test name="gtest-partial-01.cs">\r
<type name="B`1[U]">\r
<method name="Void .ctor()" attrs="6278">\r