[Issue 10751] Propagate some value ranges from contracts

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 6 01:27:38 PDT 2013


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



--- Comment #2 from bearophile_hugs at eml.cc 2013-08-06 01:27:36 PDT ---
(In reply to comment #1)
> One obstacle to implementing this enhancement is that D contracts allows
> arbitrary code inside the contract block.

I discussed this problem with Walter. He didn't see the need for specialized
contract programming expressions with a very limited semantics (as in Ada, C#
contrats, etc).


> So the only implementable value range analysis can only support a very limited
> form of contracts -- only asserts with simple expressions.

OK.

(So I presume you have to write the contract, and then you watch the compiler
if it's able to infer or not statically the range. I think this is a bit weird,
but I presume Walter likes it.)

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