Skip to content

Editorial: assert that MethodDefinitionEvaluation on object properties does not produce a PrivateElement - #3921

Merged
ljharb merged 1 commit into
tc39:mainfrom
bakkot:assert-not-object-private-name
Aug 6, 2026
Merged

Editorial: assert that MethodDefinitionEvaluation on object properties does not produce a PrivateElement#3921
ljharb merged 1 commit into
tc39:mainfrom
bakkot:assert-not-object-private-name

Conversation

@bakkot

@bakkot bakkot commented Jul 23, 2026

Copy link
Copy Markdown
Member

Also assert that the switch over the return value of MethodDefinitionEvaluation in ClassDefinitionEvaluation is exhaustive.

It's kinda weird to use ~unused~ for this; I'd feel better about ~empty~. But whatever, that can be a follow-up. Done in #3922.

There's a callsite of DefineMethodProperty in ClassDefinitionEvaluation that could use this assert as well, but I think it's less needed, so I left it out:

  1. Perform ! DefineMethodProperty(proto, "constructor", ctorFunc, false).

@bakkot
bakkot marked this pull request as ready for review July 23, 2026 21:34
@github-actions

Copy link
Copy Markdown

The rendered spec preview for this PR is available as a single page at https://tc39.es/ecma262/pr/3921 and as multiple pages at https://tc39.es/ecma262/pr/3921/multipage .

Comment thread spec.html
@bakkot
bakkot force-pushed the assert-not-object-private-name branch from 208d8f9 to 57ee24b Compare August 6, 2026 03:05
@bakkot

bakkot commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

Rebased, @michaelficarra PTAL

@michaelficarra michaelficarra added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Aug 6, 2026
@ljharb
ljharb force-pushed the assert-not-object-private-name branch from 57ee24b to 7cb06a7 Compare August 6, 2026 05:24
@ljharb
ljharb merged commit 7cb06a7 into tc39:main Aug 6, 2026
11 of 12 checks passed
Jack-Works added a commit to engine262/engine262 that referenced this pull request Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editorial change ready to merge Editors believe this PR needs no further reviews, and is ready to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants