Any othe options for inserting into associative array?
Richard Webb
webby at beardmouse.org.uk
Mon Nov 7 12:59:05 PST 2011
On 07/11/2011 20:27, Jesse Phillips wrote:
> Came across this when trying to get Juno to work. Is there a good workaround for it?
>
> http://d.puremagic.com/issues/show_bug.cgi?id=6906
>
> test.d(6): Error: function test.S.opAssign (int i) is not callable using argument types (S)
>
> void main() {
> S[string] ss;
> S s;
>
> ss["hello"] = s;
> }
>
> struct S {
> void opAssign(int i) {
> }
> }
I have a recollection that i replaced an opAssign with a custom assign
function when getting Juno to build with D2 a while ago because of
something like this (was in the MethodProxy struct in com.client). That
did hit a different DMD bug at the time as well though.
Not ideal, but it got it working at least.
More information about the Digitalmars-d-learn
mailing list