[Issue 6856] Absence of in() contract (precondition) should mean "use default precondition" instead of "ignore inherited in() contracts"

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 21 21:45:06 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=6856



--- Comment #30 from timon.gehr at gmx.ch 2013-01-21 21:45:01 PST ---
(In reply to comment #28)
> Not sure why this wasn't flagged as INVALID before.  But now that the summary
> line's changed and some comments to the effect of it have been posted, it's
> essentially an enhancement request.

This issue makes the feature basically useless. About half the point of
contracts is that they are inherited. The spec contains a bug. This is not a
valid implementation of dbc.

> But it'll probably be rejected because the code breakage that would result.

Code is broken now, without contracts catching it because people do not care
about tracking down all methods that override a method that specifies an
in-contract and adding an in { assert(0); } contract.

It is basically never the case that a overridden method does not need to rely
on any in-contract if the super class method does. This is stupid, and everyone
actually using the feature will agree with me.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list