https://d.puremagic.com/issues/show_bug.cgi?id=11591

           Summary: `const`/`immutable` `std.typecons.Tuple`-s with
                    classes fails at runtime as associative array keys
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: regression
          Priority: P2
         Component: Phobos
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Denis Shelomovskij <[email protected]> 2013-11-24 
12:46:59 MSK ---
At least a year ago `const`/`immutable` `std.typecons.Tuple`-s with classes
worked as associative array keys. The fact it fails at runtime now is rather
nasty. It should either work or fail to compile.

---
import std.typecons;

void main()
{
    alias T = Tuple!Object;
    int[const T] aa; // No CT errors
    aa[T()] = 1;
    aa[T()] = 1; // Error at runtime
}
---
object.Error: TypeInfo.compare is not implemented
---

E.g. fixing Issue 11590 will fix this issue by rejecting such associative
arrays to compile unless Issue 1824 is fixed.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to