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

OrdinaryCreateFromConstructor has wrong parameter type #3168

Open
bathos opened this issue Sep 7, 2023 · 2 comments · May be fixed by #3287
Open

OrdinaryCreateFromConstructor has wrong parameter type #3168

bathos opened this issue Sep 7, 2023 · 2 comments · May be fixed by #3287

Comments

@bathos
Copy link
Contributor

bathos commented Sep 7, 2023

OrdinaryCreateFromConstructor’s signature description indicates that its first argument is a constructor:

The abstract operation OrdinaryCreateFromConstructor takes arguments constructor (a constructor) and intrinsicDefaultProto (a String) and optional argument internalSlotsList [...]

However when this is called from EvaluateGeneratorBody and EvaluateAsyncGeneratorBody, the function that’s passed as the first argument is never a constructor.

The correct type for the first argument is function object. Note that the similarly-misleadingly-named GetPrototypeFromConstructor AO that it delegates to already states the correct type.

@Supriya1105
Copy link

Can you please assign this issue to me ? #3168

@ljharb
Copy link
Member

ljharb commented Jan 28, 2024

@Supriya1105 in general in open source, nothing gets assigned to anyone; you just put up a PR if you want to work on something.

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

Successfully merging a pull request may close this issue.

4 participants