Shortcut evaluation for hierarchy of in contracts

Daniel Murphy yebblies at nospamgmail.com
Fri Jul 1 10:51:02 PDT 2011


"Walter Bright" <newshound2 at digitalmars.com> wrote in message 
news:iul14g$1dfs$2 at digitalmars.com...
> On 7/1/2011 6:53 AM, Daniel Murphy wrote:
>> To enforce this, the compiler should give an error if a base function's
>> precondition passes but a derived precondition does not.
>
> No, it should not. Only one of the contracts needs to pass.
>
>> The requirement is not really that any 'in' contract passing is good 
>> enough,
>
> Yes, it is.
>
>> it's just assumed that all preconditions on inherited functions will pass 
>> if
>> the base contract does.
>
> Only one contract needs to pass.

Yeah, I did get this eventually. 




More information about the Digitalmars-d mailing list