ecma262 icon indicating copy to clipboard operation
ecma262 copied to clipboard

Normative: Allow [[ReferencedName]] in Reference Records to be a not-yet-resolved property key

Open rkirsling opened this issue 1 year ago • 8 comments

Resolves #3295.

rkirsling avatar Mar 29 '24 10:03 rkirsling

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).

bakkot avatar Mar 29 '24 16:03 bakkot

Looks good other than those comments, thanks for doing this!

bakkot avatar Mar 29 '24 16:03 bakkot

This means the test linked in the referenced issue will be invalidated and needs to be updated or removed, correct?

linusg avatar Apr 10 '24 14:04 linusg

That is correct. If anybody's gung-ho to do it, I won't stop 'em, but otherwise I can do so. :wink:

rkirsling avatar Apr 10 '24 14:04 rkirsling

Corresponding test262 PR: https://github.com/tc39/test262/pull/4052

rkirsling avatar Apr 11 '24 05:04 rkirsling

We should update these tests and also add a test for this case before merging.

bakkot avatar Apr 17 '24 21:04 bakkot

Done! https://github.com/tc39/test262/pull/4060

rkirsling avatar Apr 18 '24 06:04 rkirsling

The additional tests are merged.

ptomato avatar Apr 22 '24 19:04 ptomato