[Issue 14017] Assignment of a mutable array returned from non-`pure` function to `immutable` global variable is allowed

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Jan 20 11:02:27 PST 2015


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

Steven Schveighoffer <schveiguy at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy at yahoo.com

--- Comment #1 from Steven Schveighoffer <schveiguy at yahoo.com> ---
It's CTFE executed, so immutable is fine. Although I think it would be
permissible for pure to be inferred here because of the auto return type.

The bug is the opposite -- it should allow the char[] array to also be
assigned.

--


More information about the Digitalmars-d-bugs mailing list