Thread overview
[Issue 10939] Inconsistent stripping of "in" but not assert in release/unittest
Jan 05, 2014
David Nadlinger
Jan 05, 2014
David Nadlinger
Jan 06, 2014
Kenji Hara
January 05, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=10939


David Nadlinger <code@klickverbot.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code@klickverbot.at


--- Comment #1 from David Nadlinger <code@klickverbot.at> 2014-01-05 14:37:00 PST ---
The question then becomes: What should _not_ be stripped with -release in -unittest mode?

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 05, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=10939



--- Comment #2 from David Nadlinger <code@klickverbot.at> 2014-01-05 14:40:02 PST ---
Erm, sorry, I managed to get that statement precisely the wrong way around.

My point was that the question becomes what of the code affected by -release actually _should_ be stripped in -release -unittest mode if e.g. contracts are left in.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 06, 2014
https://d.puremagic.com/issues/show_bug.cgi?id=10939



--- Comment #3 from Kenji Hara <k.hara.pg@gmail.com> 2014-01-05 22:33:09 PST ---
Current behavior:

If "-release" is specified, following code would be stripped normally:
- invariant
- in contract
- out contract
- assertions

 https://github.com/D-Programming-Language/dmd/blob/master/src/mars.c#L1107

But, if "-unittest" is specified at the same time, just only assertions will be re-enabled.

 https://github.com/D-Programming-Language/dmd/blob/master/src/mars.c#L1121

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------