[Issue 14038] [REG2.067a] Non-mutable AA initialization segfaults in runtime

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jan 24 14:45:52 PST 2015


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

--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
More better test case:

class C
{
    immutable ubyte[string] wordsAA;
    this()
    {
        wordsAA["zero"] = 0;  // segfaults
    }
}
void main()
{
    auto c = new C();
}

The original code is initializing immutable AA inside foreach loop. I think it
would be a multiple variable initialization and essentially should be
disallowed.

--


More information about the Digitalmars-d-bugs mailing list