Skip to content

[object-rest] Add coverage for comma-after-rest-property - #5102

Merged
gibson042 merged 3 commits into
tc39:mainfrom
gibson042:2026-08-comma-after-assignmentrestproperty-is-invalid
Aug 7, 2026
Merged

[object-rest] Add coverage for comma-after-rest-property#5102
gibson042 merged 3 commits into
tc39:mainfrom
gibson042:2026-08-comma-after-assignmentrestproperty-is-invalid

Conversation

@gibson042

@gibson042 gibson042 commented Aug 3, 2026

Copy link
Copy Markdown
Member

e.g., let {...rest,} = obj; or ({...rest,} = obj).

Currently failed by engine262, GraalJS, Hermes, and Moddable XS.

Also performs some minor cleanup in src/dstr-assignment:

  • Remove array-rest-elision-invalid.case (redundant with array-rest-before-elision.case).
  • Fix a typo in obj-rest-not-last-element-invalid.case ("AssignmenProperty" → "AssignmentProperty")

@@ -1,20 +0,0 @@
// Copyright (C) 2015 the V8 project authors. All rights reserved.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably you should also delete the generated tests? Or am I not understanding how this works?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They were removed; GitHub just rendered them as renames.

@bakkot bakkot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than comment.

Incidentally I know at least some projects had a related bug for function parameter lists (e.g. TypeScript), and I didn't immediately see any coverage for that either.

@gibson042
gibson042 merged commit be13516 into tc39:main Aug 7, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants