foreach AA key char[] type change

bearophile bearophileHUGS at
Sat Jun 5 17:42:43 PDT 2010

Do you know why this D2 program prints  const(char)[]  instead of  char[] ?

import std.stdio: writeln;
void main() {
    int[char[]] data = [cast(char[])"foo" : 1];
    foreach (key, val; data)

Bye and thank you,

More information about the Digitalmars-d-learn mailing list