[Issue 18529] .ptr on arrays can no longer be used in @safe code prevents valid code

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 27 08:29:34 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18529

anonymous4 <dfj1esp02 at sneakemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
           Hardware|x86                         |All
         Resolution|---                         |INVALID
           Severity|regression                  |enhancement

--- Comment #1 from anonymous4 <dfj1esp02 at sneakemail.com> ---
No, array's ptr can't be blindly dereferenced:
---
int[1] a;
*a[$..$].ptr=0;
---
This is not trivial and requires a DIP.

--


More information about the Digitalmars-d-bugs mailing list