archives

« Bugzilla Issues Index

#3252 — 7.1.14 ToPropertyKey: accept objects whose primitive value is a symbol


Currently, ToPropertyKey(argument) is specified to throw if the argument is an object that can't be converted to a string. IMHO, it should accept objects such that
ToPrimitive(argument, hint string) is a symbol (this includes Object(Symbol())):

1. Let key be ToPrimitive(argument, hint string).
2. ReturnIfAbrupt(key).
3. If Type(key) is Symbol, return key.
4. Return ToString(key).


fixed in rev28 editor's draft


fixed in rev28