http://d.puremagic.com/issues/show_bug.cgi?id=8464

           Summary: debug too strict from function attributes
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: rtcv...@yahoo.com


--- Comment #0 from Era Scarecrow <rtcv...@yahoo.com> 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to