www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Is D Contracts broken?

reply =?ISO-8859-1?Q?Hans-Eric_Gr=f6nlund?= <hasse42g gmail.com> writes:
Is this paragraph in the Contract Programming section of the specification
valid?

"If a function in a derived class overrides a function in its super class, then
only one of the in contracts of the function and its base functions must be
satisfied."

In the tests I make inherited in-clauses are never invoked.

(I have more details on this on my weblog: http://www.hans-eric.com/)

Best regards 

Hans-Eric Grönlund
Aug 29 2007
next sibling parent reply Deewiant <deewiant.doesnotlike.spam gmail.com> writes:
Hans-Eric Grönlund wrote:
 Is this paragraph in the Contract Programming section of the specification
 valid?
 
 "If a function in a derived class overrides a function in its super class,
 then only one of the in contracts of the function and its base functions must
 be satisfied."
 
 In the tests I make inherited in-clauses are never invoked.
 
 (I have more details on this on my weblog: http://www.hans-eric.com/)
 
http://d.puremagic.com/issues/show_bug.cgi?id=302 -- Remove ".doesnotlike.spam" from the mail address.
Aug 29 2007
parent =?ISO-8859-1?Q?Hans-Eric_Gr=c3=b6nlund?= <hasse42g gmail.com> writes:
Ok, it's not implemented yet. Thanks!

Deewiant Wrote:

 Hans-Eric Grönlund wrote:
 Is this paragraph in the Contract Programming section of the specification
 valid?
 
 "If a function in a derived class overrides a function in its super class,
 then only one of the in contracts of the function and its base functions must
 be satisfied."
 
 In the tests I make inherited in-clauses are never invoked.
 
 (I have more details on this on my weblog: http://www.hans-eric.com/)
 
http://d.puremagic.com/issues/show_bug.cgi?id=302 -- Remove ".doesnotlike.spam" from the mail address.
Aug 29 2007
prev sibling parent Sean Kelly <sean f4.ca> writes:
Hans-Eric Grönlund wrote:
 Is this paragraph in the Contract Programming section of the specification
valid?
 
 "If a function in a derived class overrides a function in its super class,
then only one of the in contracts of the function and its base functions must
be satisfied."
It's supposed to be, but that feature has not yet been implemented. Sean
Aug 29 2007