On Sun, 22 Mar 2015 12:58:23 +0000, Stefan Koch wrote:

> dmd infers function closures impure if impure functions are defined
> within them.
> even if those are never called and can never be accessed outside of the
> closure.
> 
> Example :
> 
> int a;
> void closure() pure {
>    impure_function() {
>      a++;
>     }
> }
> t.d(4): Error: pure function 't.closure.impure_function' cannot access
> mutable static data 'a'
> 
> is this intended ?

i think it is. you can't do anything with `impure_function` anyway.

Attachment: signature.asc
Description: PGP signature

Reply via email to