Inheritance and in-contracts
bearophile via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Dec 5 15:24:10 PST 2014
Joseph Rushton Wakeling:
> Suppose I have a base class where one of the methods has an
> in-contract,
It's named "precondition" or "pre-condition".
> Following the example on p.331, I did try calling
> super.__in_contract_format(n) (... or
> this.Base.__in_contract_format(n) or other variants), but that
> doesn't seem to work:
>
> Error: no property '__in_contract_foo' for type
> 'incontract.Base'
>
> ... so can anyone advise if there is a reasonable way of
> achieving this?
Is this a strong need?
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list