On Sat, Mar 17, 2012 at 03:03:02PM +1100, Daniel Murphy wrote: > "H. S. Teoh" <[email protected]> wrote in message > news:[email protected]... [...] > > P.S. The error message is: > > > > newAA.d(58): Error: slice this.key[] is not mutable [...] > > Why is the assignment being translated into a slice for the > > assignment? [...] > > Oh, this. There are a bunch of bugs with const/immutable static > arrays. During AssignExp::semantic, a = b (where a and b are static > arrays) gets converted to a[] = b[]. This is incorrect, the > transformation should happen during the glue layer. [...]
Argh. So I have to hack around this by casting an immutable static array key into a mutable one inside the AA? (Which should work, I suppose, because a copy is being made.) Or should I just leave this alone for now and wait for dmd to be fixed? T -- Being able to learn is a great learning; being able to unlearn is a greater learning.
