The patch misses to take into consideration inout member functions. Eg. the following function still manages to unsafely coerce its argument to mutable:
int* foo(inout(int)* x)@safe{
struct S{ inout(int)* screwUp()inout{ return x; } }
return S().screwUp();
}
Comment #4 by k.hara.pg — 2013-08-20T19:42:48Z
(In reply to comment #3)
> The patch misses to take into consideration inout member functions. Eg. the
> following function still manages to unsafely coerce its argument to mutable:
>
> int* foo(inout(int)* x)@safe{
> struct S{ inout(int)* screwUp()inout{ return x; } }
> return S().screwUp();
> }
https://github.com/D-Programming-Language/dmd/pull/2487
Comment #5 by github-bugzilla — 2013-08-27T13:18:03Z