Hi there,
Just found that following construct: mapping m = ([ "key": "value" ]); array a = ({ m }); foreach (a; ; int v) // Note the type of v write("%O", v); ...does work (7.6.6) - it prints mapping, while typeof(v) is int (_typeof(v) is mapping, however).
Actually, it doesn't matter which type is used to declare v - it will work anyway - both for indexes and values: foreach (anyvalue; int k; int v) // This will always work, regardless write("%O=%O\n", k, v); // of type of anyvalue and it's elements Seems to be a bug or? Regards, /Al