[Issue 20634] @safe forces bounds checking on newly allocated array when using .ptr
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Jul  5 15:56:20 UTC 2023
    
    
  
https://issues.dlang.org/show_bug.cgi?id=20634
Nick Treleaven <nick at geany.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick at geany.org
--- Comment #1 from Nick Treleaven <nick at geany.org> ---
The reason for this error is to prevent `[42][1..1].ptr`, which is not @safe.
Your example could be allowed if the literal has not been sliced.
--
    
    
More information about the Digitalmars-d-bugs
mailing list