[Issue 19206] after a dynamic array element in modified, the entire array appears to be unchanged
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Aug 29 21:49:34 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19206
| <dhasenan at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |dhasenan at gmail.com
Resolution|--- |INVALID
--- Comment #1 from | <dhasenan at gmail.com> ---
You have an error in your code. Structs are value types; assignment is copying.
You assign vertex B to a temporary variable w, then call strongConnect to
update that temporary variable, then throw that variable away.
When reporting bugs, it's helpful to make your example as minimal as possible,
to use the standard D format instead of a maximally compact format
(https://github.com/dlang-community/dfmt with default options, for instance),
and to include assertions when data is not in the state you expect.
You can also ask on https://forum.dlang.org/group/learn for people to look at
code that's not behaving as you expect.
Best of luck!
--
More information about the Digitalmars-d-bugs
mailing list