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=80257 --- shadow/80257 2006-12-13 20:06:38.000000000 -0500 +++ shadow/80257.tmp.30647 2006-12-13 20:06:38.000000000 -0500 @@ -0,0 +1,57 @@ +Bug#: 80257 +Product: Mono: Compilers +Version: 1.0 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: C# +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Overload resolution makes explicit delegate casts fail. + +The following program should compile, it fails because there is an overload +that takes an object: + +public delegate object Get (Do d); + +public class Do { + public void Register (Get g) + { + } + + public void Register (object g) + { + } + + static object MyGet (Do d) + { + return null; + } + + public void X () + { + Register (Do.MyGet); + } +} + +public class User { + static void Main () + { + } +} + +If the overload void Register (object g) is removed, the program compiles, +otherwise it produces: + +par.cs(19,13): error CS0654: Method `Do.MyGet()' is referenced without +parentheses +Compilation failed: 1 error(s), 0 warnings + +It builds fine with CSC 2 _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
