www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11590] New: [AA] Associative arrays should reject uncomparable types

reply d-bugmail puremagic.com writes:
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: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg gmail.com> 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: -------
Nov 24 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11590


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |DUPLICATE


--- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2014-01-01
02:46:07 PST ---
*** This issue has been marked as a duplicate of issue 11591 ***

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 01 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11590



--- Comment #2 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2014-01-01
18:33:14 MSK ---
(In reply to comment #1)
 *** This issue has been marked as a duplicate of issue 11591 ***

IMO a dmd bug can't be a duplicate of Phobos regression. The fact that fixing dmd bug will resolve the regression can't be used this way. Also it's clearly noted in the regression description fixing this dmd bug will resolve it. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 01 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11590



--- Comment #3 from Walter Bright <bugzilla digitalmars.com> 2014-01-01
15:16:36 PST ---
11591 was fixed by fixing the compiler, and it's the same issue as this bug
report.

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