[Mono-dev] Generics on 2.4.3 (possible regression from 2.0.1)

Stefanos A. stapostol at gmail.com
Fri Oct 30 05:09:10 EDT 2009


The following code used to compile on gmcs 2.0 but fails on 2.4.3:

interface IFoo
{
    void Bar<T>(T[] data) where T : struct;
}

class Foo : IFoo
{
    public void Bar<T>(T[] data) where T : struct
    {
    }
}

"Error CS0425: The constraints for type parameter `T' of method
`Foo.Bar<T>(T[])' must match the constraints for type parameter `T' of
interface method `IFoo.Bar<T>(T[])'. Consider using an explicit
interface implementation instead"

This looks similar to bug 444235 - can someone please take a look? Is it
the same bug, or should I file a new one?



More information about the Mono-devel-list mailing list