SergeyTeplyakov / ReSharperContractExtensions

Set of extensions for R# that simplifies Design by Contract programming using Code Contracts.
MIT License
69 stars 10 forks source link

Tool doesn't show an error for incompatible return type with Contract.Ensures in property #42

Closed SergeyTeplyakov closed 10 years ago

SergeyTeplyakov commented 10 years ago
public ContractRequires Requires
{
    get
    {
        Contract.Ensures(!IsAvailable || Contract.Result<IPrecondition>() != null);
        return _contractRequires;
    }
}
SergeyTeplyakov commented 10 years ago

Actually, ContractRequires is a derived type for IPrecondition so this is no a but!