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


           Summary: gmcs fails to resolve method call with generic delegate
           Product: Mono: Compilers
           Version: SVN
          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: ---


Repro:

class T
{
        void Test ()
        {
                Attach (OnClick);
        }

        void Attach (EventHandler handler)
        {
        }
        void Attach (EventHandler<string> handler)
        {
        }

        void OnClick (string sender)
        { }
}

delegate void EventHandler (object sender);
delegate void EventHandler<T> (T sender);

Result:
[EMAIL PROTECTED]:> gmcs test.cs -target:library
test.cs(5,17): error CS0121: The call is ambiguous between the following
methods or properties: `T.Attach(EventHandler)' and
`T.Attach(EventHandler<string>)'
test.cs(8,14): (Location of the symbol related to previous error)
test.cs(11,14): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings

csc v3.5.30729.1 compiles this code successfully.


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