ecma262
ecma262 copied to clipboard
Normative: Allow [[ReferencedName]] in Reference Records to be a not-yet-resolved property key
Resolves #3295.
Calls to NamedEvaluation where the argument is _lref_.[[ReferencedName]] (e.g.) should probably be preceded with Assert: _lref_.[[ReferencedName]] is a Property Key or private name. since it is not totally obvious.
Alternatively, these could be changed to pass StringValue of |LeftHandSideExpression| (or whichever the relevant nonterminal is) instead. I think that ends up being clearer anyway, and since StringValue is not side-effecting it's ok to just call it a second time (the first having been during Evaluation).
Looks good other than those comments, thanks for doing this!
This means the test linked in the referenced issue will be invalidated and needs to be updated or removed, correct?
That is correct. If anybody's gung-ho to do it, I won't stop 'em, but otherwise I can do so. :wink:
Corresponding test262 PR: https://github.com/tc39/test262/pull/4052
We should update these tests and also add a test for this case before merging.
Done! https://github.com/tc39/test262/pull/4060
The additional tests are merged.