tc39 / proposal-record-tuple

ECMAScript proposal for the Record and Tuple value types. | Stage 2: it will change!
https://tc39.es/proposal-record-tuple/
2.5k stars 62 forks source link

Correct Tuple exotic object [[GetOwnProperty]] return type #363

Closed bathos closed 2 years ago

bathos commented 2 years ago

The [[GetOwnProperty]] algorithm for Tuple exotic objects has an early exit step for symbol keys, but the step returned false, which isn’t a possible [[GetOwnProperty]] return value. It should return undefined.

(TEO’s [[DefineOwnProperty]] never permits definition of such a property, so it’s known not to exist. The explicit early exit is not redundant, though, because the subsequent CanonicalNumericIndexString(P) only has defined behavior for string input.)