www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19206] New: after a dynamic array element in modified, the


          Issue ID: 19206
           Summary: after a dynamic array element in modified, the entire
                    array appears to be unchanged
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: john.h.nixon1 gmail.com

Created attachment 1711
  --> https://issues.dlang.org/attachment.cgi?id=1711&action=edit
It contains the D source code, a description of the error and the output

The recursive function strongConnect is modifying elements of the dynamic array
G. It starts with
vertex "a" then moves to vertex "b". While working with "a" everything seems
fine, but with "b",
b.index is updated in vertex v but this last change (b.index = 1) is not
reflected in a change to G. Instead
a change to G is delayed until the second call of strongConnect for vertex "b".
I was using dmd 2.081.2. Full details are in the attachment.

Aug 29 2018