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: call MakeClassConstructor on default class constructor #3212

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Jack-Works
Copy link
Member

The new pattern-matching proposal expects [[IsClassConstructor]] to be true for class constructors. The current spec only sets this field for ECMAScript functions. This PR expands it to default class constructors.

This should be an editorial change.

@ljharb ljharb requested a review from a team October 29, 2023 14:59
@jmdyck
Copy link
Collaborator

jmdyck commented Oct 29, 2023

Currently, MakeClassConstructor only accepts an ECMAScript function object, so you'll have to change it to allow a built-in function too.

@michaelficarra
Copy link
Member

@Jack-Works Any reason why you wouldn't just include this change as part of the pattern matching proposal? What value does it add otherwise?

@Jack-Works
Copy link
Member Author

@Jack-Works Any reason why you wouldn't just include this change as part of the pattern matching proposal? What value does it add otherwise?

When I read the spec I was surprised that the built-in constructor does not have a [[IsClassConstructor]] field. I believe this PR can make this part clearer even if the pattern-matching proposal finally does not need what this PR does.

@michaelficarra michaelficarra added the editor call to be discussed in the next editor call label Nov 1, 2023
@michaelficarra michaelficarra removed the editor call to be discussed in the next editor call label Nov 8, 2023
@bakkot
Copy link
Contributor

bakkot commented Nov 8, 2023

Editors are OK with landing this but still need to review for correctness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants