[Mono-bugs] [Bug 629351] New: Got strange compiler errors when overriding constrained methods

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Aug 7 06:08:45 EDT 2010



           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: mono-bugs at lists.ximian.com
        ReportedBy: mirapalheta at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          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:

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.

More information about the mono-bugs mailing list