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

RAB: fix reduce tests #4181

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Conversation

lahma
Copy link
Contributor

@lahma lahma commented Jul 30, 2024

Introduced in #4156 , Array.prototype.reduce had the correct signature for callback function, but typed array did not.

reduce callback has call signature «accumulator, kValue, 𝔽(k), O» earlier the collected values contained the accumalator instead of the actual value.

@lahma lahma requested a review from a team as a code owner July 30, 2024 10:08
@lahma lahma changed the title Fix TypedArray.reduce tests against RAB RAB: fix reduce tests Jul 30, 2024
@lahma
Copy link
Contributor Author

lahma commented Jul 31, 2024

Oddly enough this could have been spotted via CI run failures, but they are reported as successful even though the output shows failures: https://app.circleci.com/pipelines/github/tc39/test262/6221/workflows/6638a1b0-4796-4d85-bfee-eca8d6331712/jobs/55623/parallel-runs/0/steps/0-106

Copy link
Contributor

@ioannad ioannad left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for catching this!

Just mentioning issue #4118 - a table like this perhaps could have helped caught these errors earlier.

* reduce callback has call signature «accumulator, kValue, 𝔽(k), O »
Copy link
Contributor

@ptomato ptomato left a comment

Choose a reason for hiding this comment

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

Maintainer stamp

@ptomato ptomato merged commit 5dc04b7 into tc39:main Aug 6, 2024
8 checks passed
@lahma lahma deleted the fix-typed-array-reduce-acc branch August 7, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants