Thread overview
[Issue 9482] Option to compile in release mode, but keep in contracts on non-private functions
Jun 13, 2020
Basile-z
Jun 13, 2020
Stewart Gordon
Jun 13, 2020
Basile-z
June 09, 2015
https://issues.dlang.org/show_bug.cgi?id=9482

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unspecified                 |D2

--
June 13, 2020
https://issues.dlang.org/show_bug.cgi?id=9482

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |b2.temp@gmx.com
         Resolution|---                         |WORKSFORME

--- Comment #1 from Basile-z <b2.temp@gmx.com> ---
https://dlang.org/dmd-linux.html#switch-check

--
June 13, 2020
https://issues.dlang.org/show_bug.cgi?id=9482

--- Comment #2 from Stewart Gordon <smjg@iname.com> ---
At first I thought this was a Linux-specific feature - but I see now it's in the Windows, OSX (which is called macOS now) and FreeBSD versions alike.  Any idea when this feature was added?  Furthermore, does this switch on in contracts for all functions, or does it exclude private functions?

--
June 13, 2020
https://issues.dlang.org/show_bug.cgi?id=9482

--- Comment #3 from Basile-z <b2.temp@gmx.com> ---
(In reply to Stewart Gordon from comment #2)
> At first I thought this was a Linux-specific feature - but I see now it's in the Windows, OSX (which is called macOS now) and FreeBSD versions alike. Any idea when this feature was added?  Furthermore, does this switch on in contracts for all functions, or does it exclude private functions?

it was added in version 2.084:

https://dlang.org/changelog/2.084.0.html#check-switch

Sorry I missed the "private" criterion... maybe reopen if the check feature is not sufficient.

--