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

Walter Bright <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |INVALID

--- Comment #12 from Walter Bright <[email protected]> ---
With current master, and @safe applied, the following deprecation is printed
with or without -preview=dip1000:

test.d(8): Deprecation: slice of static array temporary returned by `bb()`
assigned to longer lived variable `this.str`

This message is correct.

Note that since the char[12] is a temporary value, there are no other
references to it, so it can safely be converted to immutable.

Closing as the compiler is working as expected.

--

Reply via email to