Contracts for delegates
Routines that simply forward the request to another object (a delegate) typically have the same signature and contract (possibly strengthened) as the delegate's routine. In which case it is slightly tedious to write out the duplicate assertions (especially if the delegating routine is using different names for the arguments), and a potential maintenance problem too.
It appears that there is a simple, problem-free, extension to the assertion syntax to improve this situation - reusing the
The suggested syntax looks like this:
It is an error if
The preconditions for
Similarly for the postconditions.