Some of Object properties are on fixed traits, which causes Dictionary to forbid using some String keys. I haven't seen this bug fixed. I cannot use names like constructor
and hasOwnProperty
.
And the worse thing is, to predicate this bug, there'll be disadvantage on internal string hashing in the Dictionary implementation.
package
{
import flash.display.*
public final class Main extends Sprite
{
}
}
import flash.utils.Dictionary
var dict:Dictionary = new Dictionary
trace(dict['hasOwnProperty'])
// assignment causes verify error
// dict.hasOwnProperty = 0
Result:
function Function() {}