On Saturday, 27 January 2018 at 14:31:13 UTC, Ali Çehreli wrote:
> But assert is also ignored in release mode:

The documentation is not clear. "they will be compiled out" means "contracts are compiled out". So, an enforce() would disappear if it's inside such a block, which should not be what the programmer wants for an enforce().

The documentation was clear as glass (but wrong): "Use assert in contracts."

Fixed it through the "Improve this page" link on that Phobos page:

  https://github.com/dlang/phobos/blob/master/std/exception.d

"Use $(D assert) in contracts." is still in there.

Reply via email to