[Issue 1926] TypeInfo methods getHash, compare, equals unimplemented for AA, function and delegate

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Nov 3 10:58:58 PST 2015


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

Andrei Alexandrescu <andrei at erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrei at erdani.com
         Resolution|---                         |FIXED

--- Comment #5 from Andrei Alexandrescu <andrei at erdani.com> ---
This works in D2:

void main() {
    import std.stdio;

    int[int] aa1 = [1:2, 3:4];
    int[int] aa2 = [5:6, 7:8];
    byte[int[int]] s;
    writeln(aa1, " ", aa2); // Prints: [1:2,3:4] [5:6,7:8]

    s[aa1] = 1;
    s[aa2] = 2;
    writeln(s); // Prints: [[1:2,3:4]:2]
}

--


More information about the Digitalmars-d-bugs mailing list