-
Notifications
You must be signed in to change notification settings - Fork 13
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
Spec Tidy Suggestion: Don't Double Construct A #35
Comments
I found this as well, while writing test262 tests. Here's a code snippet showing how it's observable from JS: class MyArray {
constructor(...args) {
console.log('called with', args);
}
}
await Array.fromAsync.call(MyArray, {
length: 2,
0: 1,
1: 2
}); This logs:
|
I've opened #41 to fix this and added it to the May agenda for approval by committee. |
My apologies for being absent from the discussion. This is a great catch, and #41 looks good to me. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
As written, the spec -may- double counstruct A:
It will be constructed first as part of Step 3.{e,f}; then if
iteratorRecord
isundefined
, it's constructed again in Step 3.k.{iv,v}.Probably that first construction could be sunk into 3.j.
The text was updated successfully, but these errors were encountered: