Bugs ?
Hello,
I think I find some bug with VS 2008 Beta 2.
This code does not compile:
public interface I1
{
}
public class C1<T> where T : C1<T>, I1
{
}
public class C2 : C1<C2>
{
}
The type 'ConsoleApplication11.C2' cannot be used as type parameter 'T' in the generic type or method 'ConsoleApplication11.C1'. There is no implicit reference conversion from 'ConsoleApplication11.C2' to 'ConsoleApplication11.I1'.
I must write that
public class C2 : C1<C2>, I1
This code compile !
Note that intellisence not allow me to define interface property.public interface I1
{
string Nom { get; set; }
}
public class C1<T> where T : C1<T>, I1
{
}
This code does not compile
public class C1<T> where T : C1<T>, I1
{
string I1.Nom
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
}
'ConsoleApplication12.C1.I1.Nom': containing type does not implement interface 'ConsoleApplication12.I1'
If it's not some bugs, can you explain me.

