Re: Any othe options for inserting into associative array?

2011-11-08 Thread Richard Webb
I just looked at my local Juno source, and it does have the change that i
mentioned in that forum post. I just added an extra version of opAssign:

  void opAssign(R)(R dg) if (is (R : MethodProxy) )
  {
method = dg.method;
returnType = dg.returnType;
paramTypes = dg.paramTypes;
  }

I forgot about that ;-)


Any othe options for inserting into associative array?

2011-11-07 Thread Jesse Phillips
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) {
   }
}


Re: Any othe options for inserting into associative array?

2011-11-07 Thread Richard Webb

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.


Re: Any othe options for inserting into associative array?

2011-11-07 Thread Jesse Phillips
On Mon, 07 Nov 2011 20:59:05 +, Richard Webb wrote:

 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.

Saw your post about the same question when digging through the Juno 
forms. Yep it is the exact same one.

Hopefully GitHub facilitates more interest in contributing. It definitely 
makes it easier.