pure vs writeln debugging
Jesse Phillips
Jesse.K.Phillips+D at gmail.com
Tue Feb 11 16:02:46 PST 2014
On Tuesday, 11 February 2014 at 07:52:57 UTC, Daniel Murphy wrote:
>
> "Jesse Phillips" wrote in message
> news:vaatltklsmbmdnabojip at forum.dlang.org...
>
>> Wish it would work with @safe and nothrow too, granted writeln
>> should eventually be @safe/trusted anyway.
>
> I just travelled back in time and granted your wish!
>
>
> int x;
> int* p;
>
> void main() pure nothrow @safe
> {
> debug x = 3;
> debug throw new Exception(null);
> debug *(p+7) = 2;
> }
I guess I wasn't clear, when I compile with -debug I should be
able to use writeln in an @safe/nothrow function just as it is
with pure.
More information about the Digitalmars-d-learn
mailing list