[Mono-bugs] [Bug 28070][Wis] New - WriteLine does not match delegate foobar (string s)
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
22 Jul 2002 14:34:50 -0000
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 mwh@sysrq.dk.
http://bugzilla.ximian.com/show_bug.cgi?id=28070
--- shadow/28070 Mon Jul 22 10:34:50 2002
+++ shadow/28070.tmp.349 Mon Jul 22 10:34:50 2002
@@ -0,0 +1,56 @@
+Bug#: 28070
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: mwh@sysrq.dk
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: WriteLine does not match delegate foobar (string s)
+
+Description of Problem:
+
+mcs-0.12 generates a compile-time-err when I try to assign
+Console.WriteLine to a delegate of void foobar (string s);
+
+Steps to reproduce the problem:
+using System;
+
+class AsyncCaller {
+ delegate void FuncToCall (string s);
+
+ // does not seem to function in 0.12
+ public void CallWriteLine (string s) {
+ FuncToCall func = new FuncToCall (Console.WriteLine);
+ IAsyncResult iar = func.BeginInvoke (s, null, null);
+ func.EndInvoke (iar);
+ }
+}
+
+class Foobar {
+ public static void Main() {
+ AsyncCaller ac = new AsyncCaller();
+ ac.CallWriteLine ("Foobar");
+ }
+}
+Actual Results:
+async.cs(7) error CS0123: Method 'void WriteLine (ulong)' does not match
+delegate 'void FuncToCall (string)'
+async.cs(7) error CS0123: Method 'void WriteLine (uint)' does not match
+delegate 'void FuncToCall (string)'
+
+Expected Results:
+"Foobar"
+
+How often does this happen?
+Everytime .. code compiles fine in Windows
+
+Additional Information: