[Mono-bugs] [Bug 415385] New: Implicit delegate casting on overloaded methods fails in some cases

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Aug 7 05:57:24 EDT 2008


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


           Summary: Implicit delegate casting on overloaded methods fails in
                    some cases
           Product: Mono: Compilers
           Version: 2.0
          Platform: x86-64
        OS/Version: openSUSE 10.3
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: other+novell at bluecherry.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Given the following code:

  public delegate void Del();
  public interface IInterface {
    void Do();
  }
  public static class Test {
    public static void Do(IInterface val) {
      Do(val.Do);
    }
    public static void Do(Del val) { }
  }

Using gmcs (mcs should give the following error, gmcs should not)

Expected result:
Compiles cleanly with implicit delegate resolution to Do(Del val)

Actual result:
error CS0654: Method `sample.IInterface.Do()' is referenced without parentheses

Versions tested:
2.0 preview and SVN revision 109737

For some reason the above case fails, but the case in bug 322949 still works
fine.
https://bugzilla.novell.com/show_bug.cgi?id=322949

I couldn't figure out what different would cause the problem vs work.


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