2006-04-20 Raja R Harinath <rharinath@novell.com>
+ * cs1502-7.cs: New test from #75800.
+
* cs0168-2.cs: New test from #66031.
2006-04-18 Raja R Harinath <rharinath@novell.com>
--- /dev/null
+// cs1502-7.cs: The best overloaded method match for `TestCase.TestS(ref object)' has some invalid arguments
+// Line: 21
+
+using System;
+
+public struct Struct {
+ public int x, y, z;
+}
+
+public class TestCase {
+
+ public static void Main() {
+
+ Struct s = new Struct();
+
+ s.x = 1;
+ s.y = 2;
+
+ System.Console.WriteLine("{0} {1} {2}", s.x, s.y, s.z);
+
+ TestS(ref s);
+ }
+
+ public static void TestS(ref object ino) {
+ System.Console.WriteLine("{0}", ((Struct)(ino)).x);
+ }
+
+}
2006-04-20 Raja R Harinath <rharinath@novell.com>
+ Fix #75800
+ * expression.cs (Invocation.VerifyArgumentsCompat): Don't try
+ implicit conversions on 'out' and 'ref' arguments.
+
* expression.cs (Invocation.VerifyArgumentsCompat): Reorganize to
improve clarity. Remove dead code.
break;
if (!TypeManager.IsEqual (a.Type, parameter_type)) {
+ if (pm == Parameter.Modifier.OUT || pm == Parameter.Modifier.REF)
+ break;
+
Expression conv = Convert.ImplicitConversion (ec, a_expr, parameter_type, loc);
if (conv == null)
break;
2006-04-20 Raja R Harinath <rharinath@novell.com>
+ Fix #75800
+ * expression.cs (Invocation.VerifyArgumentsCompat): Don't try
+ implicit conversions on 'out' and 'ref' arguments.
+
* expression.cs (Invocation.VerifyArgumentsCompat): Reorganize to
improve clarity. Remove dead code.
break;
if (!a.Type.Equals (parameter_type)) {
+ if (pm == Parameter.Modifier.OUT || pm == Parameter.Modifier.REF)
+ break;
+
Expression conv = Convert.ImplicitConversion (ec, a_expr, parameter_type, loc);
if (conv == null)
break;