[Mono-bugs] [Bug 667261] New: CS1501 when an optional parameter is followed by a params parameter of the same type
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Jan 26 06:08:45 EST 2011
https://bugzilla.novell.com/show_bug.cgi?id=667261
https://bugzilla.novell.com/show_bug.cgi?id=667261#c0
Summary: CS1501 when an optional parameter is followed by a
params parameter of the same type
Classification: Mono
Product: Mono: Compilers
Version: 2.8.x
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: msafar at novell.com
ReportedBy: microsoftenator at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=410467)
--> (http://bugzilla.novell.com/attachment.cgi?id=410467)
Test Case
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.83 Safari/534.13
When a method that contains an optional parameter followed immediately by a
params argument of the same type )eg. public void ParamsTest(string s = "",
params string[] args) ) is called with more than a certain number of arguments
(4, in this case), the compiler will fail with error CS1501.
Reproducible: Always
Steps to Reproduce:
1. Create a method with parameters (object ob = null, params object[] args)
2. Call the method, passing at least 5 objects
3. Compile
Actual Results:
Compiling fails with error CS1501
"error CS1501: No overload for method `MethodName' takes `5' arguments"
Expected Results:
Should Compile with no errors. Compiles correctly with MS .NET compiler
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list