Crash in out contract in interface

Alex Rønne Petersen xtzgzorex at gmail.com
Wed Aug 24 09:39:31 PDT 2011


On 24-08-2011 16:47, Andrei Alexandrescu wrote:
> On 8/24/11 6:58 AM, Timon Gehr wrote:
>> So, basically interfaces are the only place in D?/DMD where you can even
>> specify contracts without a function body and there they don't work. I
>> think the bug is not the only problem, actual contracts should /always/
>> be part of the function declaration and not require an implementation to
>> work. Everything else degrades contracts to simple syntactic sugar for
>> assertions.
>
> That plus interplay with inheritance.
>
> Andrei

Have you seen how Microsoft's Code Contracts deals with inheritance?

It's described in the documentation at this page: 
http://msdn.microsoft.com/en-us/devlabs/dd491992

- Alex


More information about the Digitalmars-d mailing list