Generics on 2.4.3 (possible regression from 2.0.1)

3 messages Options
Embed this post
Permalink
StApostol

Generics on 2.4.3 (possible regression from 2.0.1)

Reply Threaded More More options
Print post
Permalink
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?

_______________________________________________
Mono-devel-list mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/mono-devel-list
Marek Safar

Re: Generics on 2.4.3 (possible regression from 2.0.1)

Reply Threaded More More options
Print post
Permalink
Hi Stefanos,

> 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?
>  
You don't have to fill a new bug report. The issue has been resolved in
Mono 2.6

Thanks
Marek
_______________________________________________
Mono-devel-list mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/mono-devel-list
StApostol

Re: Generics on 2.4.3 (possible regression from 2.0.1)

Reply Threaded More More options
Print post
Permalink
Στις 30-10-2009, ημέρα Παρ, και ώρα 09:53 +0000, ο/η Marek Safar έγραψε:
> Hi Stefanos,
> >
> > This looks similar to bug 444235 - can someone please take a look? Is it
> > the same bug, or should I file a new one?
> >  
> You don't have to fill a new bug report. The issue has been resolved in
> Mono 2.6
>

Thanks!

_______________________________________________
Mono-devel-list mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/mono-devel-list