[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 22:06:35 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23420
Paul Backus <snarwin+bugzilla at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |snarwin+bugzilla at gmail.com
Severity|normal |enhancement
--- Comment #2 from Paul Backus <snarwin+bugzilla at gmail.com> ---
Reduced example:
---
void main()
{
int[1] sa;
int[] da = [0];
sa = da; // equivalent: sa[] = da[]
da = sa; // equivalent: da = sa[]
}
---
The assignments are allowed because of implicit slicing, so this is a subset of
issue 15932.
--
More information about the Digitalmars-d-bugs
mailing list