Re: Rang violation using AA's

2013-02-08 Thread Nrgyzer
On Friday, 8 February 2013 at 20:30:00 UTC, Maxim Fomin wrote: On Friday, 8 February 2013 at 20:10:32 UTC, Nrgyzer wrote: void main() { int[string] b; b["hello"] = 3; } This works for both versions... but I don't know why using a method with ref-return value doesn't work anymore. Thanks

Re: Rang violation using AA's

2013-02-08 Thread Maxim Fomin
On Friday, 8 February 2013 at 20:10:32 UTC, Nrgyzer wrote: void main() { int[string] b; b["hello"] = 3; } This works for both versions... but I don't know why using a method with ref-return value doesn't work anymore. Thanks for your suggestion. This works because an element is assign

Re: Rang violation using AA's

2013-02-08 Thread Nrgyzer
On Friday, 8 February 2013 at 19:24:55 UTC, simendsjo wrote: On Friday, 8 February 2013 at 17:16:15 UTC, Nrgyzer wrote: Hi guys, I'm updated from DMD 2.060 to 2.061 and I just run into some trouble by using associative arrays. Let's say I've the following few lines: string[string] myValues;

Re: Rang violation using AA's

2013-02-08 Thread simendsjo
On Friday, 8 February 2013 at 17:16:15 UTC, Nrgyzer wrote: Hi guys, I'm updated from DMD 2.060 to 2.061 and I just run into some trouble by using associative arrays. Let's say I've the following few lines: string[string] myValues; ref string getValue(string v) { return myValues[v]; } vo

Rang violation using AA's

2013-02-08 Thread Nrgyzer
Hi guys, I'm updated from DMD 2.060 to 2.061 and I just run into some trouble by using associative arrays. Let's say I've the following few lines: string[string] myValues; ref string getValue(string v) { return myValues[v]; } void main() { getValue("myValue") = "myString"; } I get a