[Issue 6857] Precondition contract checks should be statically bound.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun May 6 02:19:46 PDT 2012


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



--- Comment #57 from deadalnix <deadalnix at gmail.com> 2012-05-06 02:20:47 PDT ---
(In reply to comment #55)
> So I'm reopening it as a normal bug.
> 

Thank you !

> Unfortunately, I do not currently see a reasonable way of implementing this.
> Fortunately, as is it does not inhibit correct programs, it only accepts some
> invalid ones.

That is not this complicated. you need a final function that check the in
contract, then call another virtual function that actually execute the function
body and the out contract.

With such a configuration, the in contract is checked and only then the virtual
dispatch is done.

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