Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
June 27, 2014 [Issue 8464] debug too strict from function attributes | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=8464 Jesse Phillips <Jesse.K.Phillips+D@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Jesse.K.Phillips+D@gmail.co | |m -- |
July 20, 2014 [Issue 8464] debug too strict from function attributes | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=8464 hsteoh@quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh@quickfur.ath.cx -- |
July 20, 2014 [Issue 8464] debug too strict from function attributes | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=8464 bearophile_hugs@eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs@eml.cc --- Comment #4 from bearophile_hugs@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{}? -- |
July 21, 2014 [Issue 8464] debug too strict from function attributes | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=8464 --- Comment #5 from hsteoh@quickfur.ath.cx --- This came up in a recent PR, where assumeUTF has a `debug validate(s)` line to run a validation check on the input ubyte[]/short[]/int[] in order to catch user error when passing in invalid data. Since validate() is an expensive operation, we only do it during -debug. It also makes the function throwing, etc., which would make it stop compiling if called from pure/nothrow/etc. code. -- |
October 10, 2019 [Issue 8464] debug too strict from function attributes | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=8464 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |razvan.nitu1305@gmail.com Resolution|--- |FIXED --- Comment #6 from RazvanN <razvan.nitu1305@gmail.com> --- This has been fixed in git master. Closing as fixed. -- |
Copyright © 1999-2021 by the D Language Foundation