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: [email protected] ReportedBy: [email protected] QAContact: [email protected] 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. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
