https://issues.dlang.org/show_bug.cgi?id=8464
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #4 from [email protected] --- (In reply to Era Scarecrow from comment #0) > If a function is @safe then the debug {} calls all remain required to also > follow that requirement as well. > > void pureSafe() @safe pure { > debug { > writeln("Debugging info!"); > } > } > Error: safe function 'pureSafe' cannot call system function 'writeln' > > Marking the function as @trusted (although works) when the non-debug code > is provably @safe seems like a bad approach just for debugging. Debug scope > should break constraints and limitations for debugging purposes. What other unsafe functions do you want to call (beside writeln) in a debug{}? --
