MXMLC WTF (8): Keys can be of any type as long as it’s String
Thursday, July 24th, 2008
Have you ever tried looping over all the keys in a Dictionary? The whole point of the Dictionary class is that you can have objects of any type as keys, unfortunately someone forgot to tell the ActionScript compiler that:
var dict : Dictionary = ...;
for ( var k : MySpecialType in dict ) { trace(k, dict[k]); }
Error: Implicit coercion of a value of type String to an unrelated type
WTF?