http://d.puremagic.com/issues/show_bug.cgi?id=5030

           Summary: Operators don't work with AssociativeArray!(T1,T2)
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: cbkbbej...@mailinator.com


--- Comment #0 from Nick Sabalausky <cbkbbej...@mailinator.com> 2010-10-09 
17:28:23 PDT ---
---------------------------
import std.stdio;
void main()
{
    string[string] aa1;
    AssociativeArray!(string,string) aa2;

    if("" in aa1) {} // Ok
    if("" in aa2) {} // Error

    aa1[""] = ""; // Ok
    aa2[""] = ""; // Error
}
---------------------------

Result:
---------------------------
testAA.d(8): Error: rvalue of in expression must be an associative array, not
AssociativeArray!(string,string)
testAA.d(11): Error: no [] operator overload for type
AssociativeArray!(string,string)
---------------------------

This might be related to issue 4723:
http://d.puremagic.com/issues/show_bug.cgi?id=4723

This is particularly problematic for metaprogramming due to issue 5029.

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

Reply via email to