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

           Summary: [AA] Associative arrays should reject uncomparable
                    types
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Denis Shelomovskij <[email protected]> 2013-11-24 
12:27:29 MSK ---
Currently associative arrays accepts uncomparable types and fails only at
runtime:
---
struct S
{ void opCmp() { } }

void main()
{
    int[const S] aa; // Must be a compilation error
    aa[S.init] = 1;
    aa[S.init] = 1; // Error at runtime
}
---
object.Error: TypeInfo.compare is not implemented
---

Also see Issue 11589.

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

Reply via email to