Thread overview
[Issue 6297] cast() does not remove const or immutable on arrays and pointers
Dec 17, 2022
Iain Buclaw
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=6297

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P4

--
May 16
https://issues.dlang.org/show_bug.cgi?id=6297

Nick Treleaven <nick@geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick@geany.org

--- Comment #1 from Nick Treleaven <nick@geany.org> ---
The spec (now) says:

> Casting with no type or qualifiers removes any top level const, immutable, shared or inout type modifiers from the type of the UnaryExpression

https://dlang.org/spec/expression.html#cast_qualifier

Note 'top level'. So I think this is invalid.

--
May 16
https://issues.dlang.org/show_bug.cgi?id=6297

Steven Schveighoffer <schveiguy@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Steven Schveighoffer <schveiguy@gmail.com> ---
I have no idea what I was thinking those 13 years ago. OK to close ;)

--