[Issue 7444] Require [] for array copies too

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 19 17:16:41 UTC 2024


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

Nick Treleaven <nick at geany.org> changed:

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

--- Comment #24 from Nick Treleaven <nick at geany.org> ---
I think `[]` should be required at least for assigning a single element to a
static array, like it is for a dynamic array.

Another issue is with an AA of static array key type:
https://forum.dlang.org/post/dokvozlfivgerkwhupvs@forum.dlang.org

// meant to create key "test" and copy slice as value
lookup["test"] = dynArray[0 .. $];
// instead causes a missing key error as it becomes
lookup["test"][0 .. $] = dynArray[0 .. $];

--


More information about the Digitalmars-d-bugs mailing list