[Mono-bugs] [Bug 70150][Maj] New - Anonymous methods in delegate creation
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 2 Dec 2004 14:51:39 -0500 (EST)
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 martin@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=70150
--- shadow/70150 2004-12-02 14:51:39.000000000 -0500
+++ shadow/70150.tmp.15132 2004-12-02 14:51:39.000000000 -0500
@@ -0,0 +1,36 @@
+Bug#: 70150
+Product: Mono: Compilers
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: C#
+AssignedTo: miguel@ximian.com
+ReportedBy: martin@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Anonymous methods in delegate creation
+
+When compiling
+
+=====
+public delegate double Mapper (int item);
+
+class X
+{
+ static void Main ()
+ {
+ Mapper mapper = new Mapper (delegate (int i) { return
+i/10.0; });
+ }
+}
+======
+
+I'm getting
+C.cs(9) error CS0118: Expression denotes a `value' where a `method' was
+expected