[Mono-bugs] [Bug 80676][Min] New - mcs does not treat a method with params as identical to those without params
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Jan 30 15:31:33 EST 2007
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 atsushi at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=80676
--- shadow/80676 2007-01-30 15:31:33.000000000 -0500
+++ shadow/80676.tmp.17966 2007-01-30 15:31:33.000000000 -0500
@@ -0,0 +1,57 @@
+Bug#: 80676
+Product: Mono: Compilers
+Version: 1.0
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: atsushi at ximian.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: mcs does not treat a method with params as identical to those without params
+
+mcs does not seem to treat such a method whose rightmost argument is
+"params" as identical to those methods without "params". For example,
+
+ public static void Main (params string [] args) {}
+
+should be identical to
+
+ public static void Main (string [] args) {}
+
+while it is not.
+
+The corresponding ECMA 334 part is 10.1 and 10.6:
+
+<quote>
+10.1 Application startup
+Application startup occurs when the execution environment calls a
+designated method, which is referred to as the application's entry point.
+This entry point method is always named Main, and shall have one of the
+following signatures:
+ static void Main() {
}
+ static void Main(string[] args) {
}
+ static int Main() {
}
+ static int Main(string[] args) {
}
+</quote>
+
+<quote>
+10.6 Signatures and overloading
+Methods, instance constructors, indexers, and operators are characterized
+by their signatures:
++ The signature of a method consists of the name of the method, the number
+of type parameters, and the type and kind (value, reference, or output) of
+each of its formal parameters, considered in the order left to right. The
+signature of a method specifically does not include the return type,
+parameter names, or type parameter names, nor does it include the params
+modifier that can be specified for the right-most parameter.
+</quote>
+
+seealso:
+http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=254476
More information about the mono-bugs
mailing list