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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=77402 --- shadow/77402 2006-01-30 07:00:15.000000000 -0500 +++ shadow/77402.tmp.26965 2006-01-30 07:00:15.000000000 -0500 @@ -0,0 +1,35 @@ +Bug#: 77402 +Product: Mono: Compilers +Version: 1.1 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: C# +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: anonymous method miscompilation with no inferred delegate type + +When mcs can't infer the delegate type to use for an anonymous method +expression it produces incorrect IL code. +See this test case: +using System; +class Test { + public static void Main(string[] argv) { + Console.WriteLine("Type of anonymous block: {0}", + (delegate() {}).GetType()); + } +} +It should give a meaningful error instead (from reading the standard this +is not valid C# code, but if it is valid it should compile to correct code:-). +Also, when assigning an anon method expression to object or to Delegate etc, +the error could be improved: it currently says: +Cannot implicitly convert type anonymous method to `System.Delegate' +Maybe it should tell that the assignment or the context should make clear +what the target delegate type is. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
