ecma262 icon indicating copy to clipboard operation
ecma262 copied to clipboard

OrdinaryCreateFromConstructor has wrong parameter type

Open bathos opened this issue 2 years ago • 2 comments

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.

bathos avatar Sep 07 '23 23:09 bathos

Can you please assign this issue to me ? #3168

Supriya1105 avatar Jan 28 '24 19:01 Supriya1105

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

ljharb avatar Jan 28 '24 21:01 ljharb