[Issue 7584] contract checking is too conservative for inherited contracts
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 3 04:17:10 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7584
--- Comment #8 from deadalnix <deadalnix at gmail.com> 2012-05-03 04:18:22 PDT ---
(In reply to comment #6)
> Out contracts are "anded" together, meaning that *all* out contracts must pass
> in an inheritance hierarchy. Out contracts in overriding functions do not
> override the out contract in the overridden function, nor are they at all
> associated with any in contracts.
What you have here is, in fact, over restrictive to ensure OOP expectations.
With both your proposal and Timon's D is fine in regard of OOP.
Now, Timon's proposal does allow more than the current behavior (and still
allow the current behavior). You have to see it as a generalization of an over
restrictive solution.
--
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