Re: Shared/const/immutable does not propagate to hash keys

2011-06-14 Thread Andrej Mitrovic
Right, right, I forgot all about that keys are immutable by default (or should be). This makes perfect sense now, thanks for the reality slap. :p

Re: Shared/const/immutable does not propagate to hash keys

2011-06-14 Thread Jonathan M Davis
On 2011-06-14 13:11, Andrej Mitrovic wrote: > shared int[int] AA; > shared int[] arr; > > void main() > { > arr = AA.keys; > } > > Error: cannot implicitly convert expression (AA.keys()) of type int[] > to shared(int[]) > > Workaround: > > shared int[shared(int)] AA; > shared int[] arr; > > vo

Shared/const/immutable does not propagate to hash keys

2011-06-14 Thread Andrej Mitrovic
shared int[int] AA; shared int[] arr; void main() { arr = AA.keys; } Error: cannot implicitly convert expression (AA.keys()) of type int[] to shared(int[]) Workaround: shared int[shared(int)] AA; shared int[] arr; void main() { arr = AA.keys; } Shouldn't shared propagate to the entire