http://d.puremagic.com/issues/show_bug.cgi?id=6906
Summary: Cannot assign value into associative array if contains opAssign Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: jesse.k.phillip...@gmail.com --- Comment #0 from Jesse Phillips <jesse.k.phillip...@gmail.com> 2011-11-07 12:24:00 PST --- This code fails to compile because the struct S implement opAssign and the compiler tries using it rather than the associative arrays insert. void main() { S[string] ss; S s; ss["hello"] = s; } struct S { void opAssign(int i) { } } test.d(6): Error: function test.S.opAssign (int i) is not callable using argument types (S) test.d(6): Error: cannot implicitly convert expression (s) of type S to int test.d(6): Error: function test.S.opAssign (int i) is not callable using argument types (S) test.d(6): Error: cannot implicitly convert expression (s) of type S to int PS C:\Documents and Settings\jphillips\src\Juno> dmd test.d test.d(5): Error: function test.S.opAssign (int i) is not callable using argument types (S) test.d(5): Error: cannot implicitly convert expression (s) of type S to int test.d(5): Error: function test.S.opAssign (int i) is not callable using argument types (S) test.d(5): Error: cannot implicitly convert expression (s) of type S to int -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------