[Issue 5030] New: Operators don't work with AssociativeArray!(T1,T2)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 9 17:28:50 PDT 2010
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: nobody at puremagic.com
ReportedBy: cbkbbejeap at mailinator.com
--- Comment #0 from Nick Sabalausky <cbkbbejeap at 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: -------
More information about the Digitalmars-d-bugs
mailing list