Summary: Comparing associative array with a storage class
                    (const/shared/immutable) causes segfault
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: druntime

--- Comment #0 from 2011-05-03 12:12:32 PDT ---
Test case:

void main() {
    const a = [4:0];
    const b = [4:0];
    assert(a == b);

This causes a NULL-pointer exception in _aaEqual. The problem is _aaEqual's
signature is

    int _aaEqual(TypeInfo_AssociativeArray ti, AA e1, AA e2)
  //             ^^^^^^^^^^^^^^^^^^^^^^^^^

but the typeid of a const AA is a TypeInfo_Const, so the 'ti.keys' used later
is invalid.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to