Summary: debug too strict from function attributes
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD

--- Comment #0 from Era Scarecrow <> 2012-07-29 13:30:35 PDT 
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.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to