[Issue 8464] New: debug too strict from function attributes
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jul 29 13:30:36 PDT 2012
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: nobody at puremagic.com
ReportedBy: rtcvb32 at yahoo.com
--- Comment #0 from Era Scarecrow <rtcvb32 at 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: -------
More information about the Digitalmars-d-bugs
mailing list