Re: Compiling debug missing errors

2017-04-09 Thread Duarte via Digitalmars-d-learn
On Sunday, 9 April 2017 at 20:59:26 UTC, ag0aep6g wrote: On 04/09/2017 10:49 PM, Duarte wrote: [...] You're allowed to break purity in debug code. From the spec: "As a concession to practicality, a pure function can also [...] perform impure operations in statements that are in a Conditiona

Re: Compiling debug missing errors

2017-04-09 Thread ag0aep6g via Digitalmars-d-learn
On 04/09/2017 10:49 PM, Duarte wrote: --- import std.stdio; pure void foo() { debug { stdout.writeln("1"); } stdout.writeln("2"); } void main(string[] args) { foo(); } --- Using either '-debug' or '-release', the second stdout will give an

Compiling debug missing errors

2017-04-09 Thread Duarte via Digitalmars-d-learn
Hi all, Using the following example: --- import std.stdio; pure void foo() { debug { stdout.writeln("1"); } stdout.writeln("2"); } void main(string[] args) { foo(); } --- Using either '-debug' or '-release', the second stdout will give a