/opt/ldc2-1.42.0/bin/../import/core/internal/newaa.d(172): Error: cannot implicitly convert expression `key` of type `const(char[])` to `string`
entry.key = key;
But if key were const(char)[] it would happily work.
int[string] properties;
auto keyName = key.data; // `const(char)[]`
properties[keyName] = value; // works
const keyName = key.data; // compiler eats the other `const` and simplifies this to `const(char[])`
properties[keyName] = value; // doesn't work
But if
keywereconst(char)[]it would happily work.