http://bugzilla.novell.com/show_bug.cgi?id=582369
http://bugzilla.novell.com/show_bug.cgi?id=582369#c0 Summary: Passing Action<T> delegate parameter causes compile error Classification: Mono Product: Mono: Compilers Version: 2.6.x Platform: x86-64 OS/Version: Linux Status: NEW Severity: Major Priority: P5 - None Component: C# AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2) Gecko/20100207 Namoroka/3.6 when trying to compile the open source project MassTransit (http://github.com/phatboyg/MassTransit), in particular the MassTransit project itself, the following error occurs: {project directory}/src/MassTransit/Grid/Sagas/ServiceMessage.cs(37,37): Error CS1501: No overload for method `Publish' takes `3' arguments (CS1501) (MassTransit) The line which causes the error is: Bus.Publish(CreateMessage<ServiceMessageAgreed>(), c => c.SetSourceAddress(Bus.Endpoint.Uri)); Which is passing two arguments, the result from CreateMessage<ServiceMessageAgreed>(), and the lambda expression (Action<IOutboundMessage> compatible) c => c.SetSourceAddress(Bus.Endpoint.Uri)); Thinking possibly an issue with the compiler parsing of the lambda expression, I altered the line to be as such: Action<IOutboundMessage> action = (IOutboundMessage c) => c.SetSourceAddress(Bus.Endpoint.Uri); ServiceMessageAgreed msgAgreed = CreateMessage<ServiceMessageAgreed>(); Bus.Publish(msgAgreed, action); However, I get the same exact error. According to the build server for MassTransit (http://teamcity.codebetter.com/overview.html), the build is successful, leading to believe the syntax is correct. Reproducible: Always Steps to Reproduce: 1. Download the source for Masstransit from github. 2. Open the MassTransit solution file 3. Attempt to build the Masstransit project Actual Results: compilation error: {project directory}/src/MassTransit/Grid/Sagas/ServiceMessage.cs(37,37): Error CS1501: No overload for method `Publish' takes `3' arguments (CS1501) (MassTransit) Expected Results: Not errored on the syntax and proceeded to compile the project. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
