https://bugzilla.novell.com/show_bug.cgi?id=350839


           Summary: Anonymous methods mask errors during type conversion.
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [EMAIL PROTECTED]
          Found By: ---


The following program masks the actual error, and it becomes difficult to
determine what the problem is inside an anonymous method:

using System;
using System.Threading;

class X {
        static void Main ()
        {
        }

        void D ()
        {
                Thread t = new Thread (delegate (object state){
                        M (1);
                });
        }

        void M (string s){
        }
}


The output currently is:

/tmp/th.cs(11,40): error CS1593: Delegate `System.Threading.ThreadStart' does
not take `1' arguments
/tmp/th.cs(11,40): error CS1661: Cannot convert `anonymous method' to delegate
type `System.Threading.ThreadStart' since there is a parameter mismatch

While MS reports that the error is in the invocation of "M()" because there is
no conversion from integer to string.


-- 
Configure bugmail: https://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

Reply via email to