[Issue 13890] Comparing arrays within structs results in an assignment.
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Jul 5 08:11:44 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=13890
Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |dlang-bugzilla at thecybershad
| |ow.net
Resolution|--- |INVALID
--- Comment #5 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
(In reply to b.j.dejong from comment #0)
> struct Bug {
> float[] elements = new float[4];
This code is invalid - Every instance of the "Bug" type will have its
"elements" field will point to the same copy of the array. It should not have
compiled. See issue 17604.
--
More information about the Digitalmars-d-bugs
mailing list