[Mono-bugs] [Bug 29020][Nor] New - mcs prefers a varargs method instead of a prarams one

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
15 Aug 2002 18:24:43 -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=29020

--- shadow/29020	Thu Aug 15 14:24:43 2002
+++ shadow/29020.tmp.6157	Thu Aug 15 14:24:43 2002
@@ -0,0 +1,34 @@
+Bug#: 29020
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lupus@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs prefers a varargs method instead of a prarams one
+
+Console.WriteLine is overloaded: two of the methods look like:
+WriteLine (string, params object[]);
+WriteLine (string, object, object, object, object, ...);
+The documentation says that the last one cannot be used in C# code.
+Still, mcs run on the ms runtime uses it for the sample below:
+using System;
+
+class T {
+        static void print (string msg) {
+                Console.WriteLine ("{0} {1} {2} {3}", msg, msg, msg, msg);
+        }
+        static void Main() { print ("a");}
+}
+The sample will still run on the ms runtime, though not on the mono one
+since we don't support the vararg call convention yet (and neither mcs
+supports it for that matter).