[Issue 12724] Error: return statements cannot be in contracts

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun May 11 13:26:47 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12724

--- Comment #7 from bearophile_hugs at eml.cc ---
(In reply to monarchdodra from comment #6)

> What's your arguments?

Is return from contract present in the DbC of Eiffel/Ada/C#/Racket? What does
it means returning from a test that verifies if a contract is holding? I think
allowing returns goes against the meaning of contracts. They are not meant to
change the flow of the code, all they have to do is to verify the input or
outputs or invariants are correct.

--


More information about the Digitalmars-d-bugs mailing list