Skip to content

fix: Incorrect function type breaking arg length and generators#70

Merged
rochdev merged 3 commits into
mainfrom
rochdev/fix-internal-fn-type
Apr 29, 2026
Merged

fix: Incorrect function type breaking arg length and generators#70
rochdev merged 3 commits into
mainfrom
rochdev/fix-internal-fn-type

Conversation

@rochdev
Copy link
Copy Markdown
Contributor

@rochdev rochdev commented Apr 22, 2026

No description provided.

@rochdev rochdev marked this pull request as ready for review April 22, 2026 20:15
// The arrow function doesn't bind its own `arguments`, so `arguments.length`
// inside it refers to the constructor's argument count (2), not the call-site
// count (1). The regular function binds its own `arguments`, so it sees the
// call-site count (1). Instrumentation must not change either binding.
Copy link
Copy Markdown
Contributor

@jsumners-nr jsumners-nr Apr 29, 2026

Choose a reason for hiding this comment

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

Isn't the count 3?

I see that the 1 is from the test.js usage of the methods. Definitely confusing without knowing what the test file looks like.

@rochdev rochdev merged commit 24f2e4c into main Apr 29, 2026
6 checks passed
@jsumners-nr jsumners-nr deleted the rochdev/fix-internal-fn-type branch April 29, 2026 14:13
@timfish timfish changed the title fix incorrect function type breaking arg length and generators fix: Incorrect function type breaking arg length and generators Apr 29, 2026
bizob2828 pushed a commit to bizob2828/orchestrion-js that referenced this pull request Apr 29, 2026
@bizob2828 bizob2828 mentioned this pull request Apr 29, 2026
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