[Mono-bugs] [Bug 464150] New: Delegate.CreateDelegate (Type, null <object>, MethodInfo [, boolean]) doesn't work

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jan 7 10:30:25 EST 2009


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


           Summary: Delegate.CreateDelegate (Type, null <object>, MethodInfo
                    [,boolean]) doesn't work
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: rkvinge at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Repro:
using System;
using System.Reflection;

class C
{
  delegate void A (C i);
  delegate void B (D i);
  event A AEvent;

  static void Main ()
  {
    Delegate d;
    MethodInfo inf;
    try {
      inf = typeof (C).GetMethod ("F");
      d = Delegate.CreateDelegate (typeof (A), null, inf, false);
      Console.WriteLine (d == null ? "FAILURE" : "SUCCESS");
      d = Delegate.CreateDelegate (typeof (B), null, inf, false);
      Console.WriteLine (d == null ? "FAILURE" : "SUCCESS");
    } catch (Exception ex) {
      Console.WriteLine (ex.ToString ());
    }
  }

  public void F (C i)
  {
  }

}

class D : C
{
}


mono (r122534) prints FAILURE FAILURE, while MS prints SUCCESS SUCCESS

Removing the 'false' argument to CreateDelegate doesn't work either.


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


More information about the mono-bugs mailing list