Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: Narrowing an assertion in SuperCall: super Arguments #3466

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

kimjg1119
Copy link
Contributor

@kimjg1119 kimjg1119 commented Nov 1, 2024

In runtime semantics SuperCall: super Arguments, there is an assertion which narrows a newTarget's type to Object. However, we know that this is always a constructor in this step, and fixing it to a constructor will resolve a mismatch between calling Construct at step 6.

Copy link
Member

@michaelficarra michaelficarra left a comment

Choose a reason for hiding this comment

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

Had to remind myself that Reflect.construct does an IsConstructor test.

Copy link
Contributor

@syg syg left a comment

Choose a reason for hiding this comment

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

lgtm

Could you please also narrow the description of the [[NewTarget]] field in Table 18 to read "a constructor or undefined" instead of "an Object or undefined"?

@michaelficarra michaelficarra added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Jan 15, 2025
ljharb pushed a commit to kimjg1119/ecma262 that referenced this pull request Jan 16, 2025
@ljharb ljharb merged commit 519149d into tc39:main Jan 16, 2025
8 checks passed
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.

5 participants