http://bugzilla.novell.com/show_bug.cgi?id=629351

http://bugzilla.novell.com/show_bug.cgi?id=629351#c0


           Summary: Got strange compiler errors when overriding
                    constrained methods
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.6.x
          Platform: All
        OS/Version: SLED 11
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US)
AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.125 Safari/533.4

Got "Error CS0425: The constraints for type parameter `A' of method
`test.Child<T>.Test<A>()' must match the constraints for type parameter `A' of
interface method `test.Parent.Test<A>()'. Consider using an explicit interface
implementation instead (CS0425)" when trying to build the following code:

public class Parent
{
  public void Test<A>()
  {
  }
}

public interface IDummy
{
}

public class Child<T> : Parent
{
  public new T Test<A>() where A : IDummy
  { return default(T); }
}

Reproducible: Always

Steps to Reproduce:
1. 
2.
3.

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