How to avoid the warining "Class 'XContract' is annotated as being the contract for the abstract class 'X' but doesn't extend the class"?
The class X static, static checker works ok with it, just the warining seems wrong:
[ContractClass(type(XContract))]
static class X
{
[DllImport("some.dll")]
public static extern void Y(int a);
}
[ContractClassFor(typeof(X))]
static class XContract
{
public static void Y(int a)
{
Contract.Requires(a >= 0);
}
}