On 07/15/2017 04:33 AM, Namal wrote:
Why does it have to be char[]?auto bytes = line.representation.dup; bytes.sort; string result = bytes.assumeUTF; works too.
That's a compiler bug. The code should not compile, because now you can mutate `result`'s elements through `bytes`. But `result`'s elements are supposed to be immutable.
I've filed an issue: https://issues.dlang.org/show_bug.cgi?id=17654