[Issue 23420] Deprecate mixing pointer/reference types and value types in the same assignment statement

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 16 21:36:26 UTC 2022


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

--- Comment #1 from mw <mingwu at gmail.com> ---
More comments from the forum discussion

--------
It would be better to error on assigning a new array expression to a static
array, there's no reason to allow that. A static array can be assigned a single
element arr = 0 instead. Although ideally there would be some syntactical way
of making it clear when assigning a slice to a static array, perhaps requiring
[] at the end unless it is already a SliceExpression or an array literal.

--


More information about the Digitalmars-d-bugs mailing list