[Issue 6856] Preconditions are not inherited

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 26 19:35:03 PST 2012


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


Jesse Phillips <Jesse.K.Phillips+D at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Jesse.K.Phillips+D at gmail.co
                   |                            |m


--- Comment #21 from Jesse Phillips <Jesse.K.Phillips+D at gmail.com> 2012-02-26 19:34:51 PST ---
(In reply to comment #15)
> There is no "B's in". That is the point. The bug is that an implicit 'in'
> contract that always passes is added to B.foo.

If I didn't supply an 'in' to the derived class function, I would expect not
abiding by the base class contract to be an error. So I agree that an explicate
foo() in{} should be used and that foo() in { assert(0); } looks like an ugly
workaround, and would prefer not to restate the inherited class contract.

-- 
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