https://issues.dlang.org/show_bug.cgi?id=8464
bearophile_h...@eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_h...@eml.cc --- Comment #4 from bearophile_h...@eml.cc --- (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{}? --