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


           Summary: Delegate.CreateDelegate is missing argument validation
           Product: Mono: Class Libraries
           Version: 1.2.6
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          Found By: ---


The following test case fails on MS.NET 2.0 with

ArgumentException: cannot bind to target method (or similar, as
I translated the message).


On Mono it succeeds, but it's obviously wrong since Test(Uri)
is invoked with an "object" argument.

using System;

delegate void Method(object o);

class T
{
        static void Main ()
        {
                T t = new T ();
                Method m = (Method) Delegate.CreateDelegate (typeof(Method), t, 
t.GetType ().GetMethod ("Test"));

                m (new object ());
        }

        public void Test (Uri uri)
        {
                Console.WriteLine (uri);
        }
}


-- 
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