[Mono-bugs] [Bug 29028][Maj] Changed - Explicit cast on null for overloaded method call fails

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
16 Aug 2002 10:47:04 -0000


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by lupus@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=29028

--- shadow/29028	Fri Aug 16 05:35:32 2002
+++ shadow/29028.tmp.17051	Fri Aug 16 06:47:04 2002
@@ -45,6 +45,29 @@
 Run test case:  System.Data.ForeignKeyConstraintTest.TestCtorExceptions()
 To reproduce.
 
 ------- Additional Comments From dietmar@ximian.com  2002-08-16 05:35 -------
 Please can you provide a full but small test case (a C# program I can
 compile an execute to reproduce the error).
+
+------- Additional Comments From lupus@ximian.com  2002-08-16 06:47 -------
+I have written this test case, but it works correctly:
+using System;
+
+class T {
+        static int val = 0;
+        static void stuff (T t, T t2) {
+                val = 1;
+                Console.WriteLine ("one");
+        }
+        static void stuff (T[] t, T[] t2) {
+                val = 2;
+                Console.WriteLine ("many");
+        }
+        static int Main() {
+                stuff ((T)null, (T)null);
+                if (val != 1)
+                        return 1;
+                return 0;
+        }
+}
+