[Issue 14440] [REG2.067] CTFE Regression: Wrong values set in a matrix constructor.

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Apr 12 05:28:32 PDT 2015


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

ag0aep6g at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |CTFE, wrong-code
                 CC|                            |ag0aep6g at gmail.com
                 OS|Linux                       |All

--- Comment #1 from ag0aep6g at gmail.com ---
Reduced further:

struct Matrix {
    int[1][2] array2D;
    this(int dummy) {
        array2D[0][0] = 1;
        array2D[1][0] = 2; /* writes over array2D[0][0] */
    }
}
static assert(Matrix(0).array2D[0][0] == 1); /* fails */

--


More information about the Digitalmars-d-bugs mailing list