-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
[Merged by Bors] - Give the arrow function its proper name #1832
Conversation
An arrow function name should be the name of the variable: const myFunction = () => {}; console.log(myFunction.name); // Prints "myFunction"
2acc8b0
to
792873d
Compare
I force-pushed changes to the |
Codecov Report
@@ Coverage Diff @@
## main #1832 +/- ##
==========================================
- Coverage 55.71% 55.61% -0.11%
==========================================
Files 201 201
Lines 17326 17374 +48
==========================================
+ Hits 9654 9663 +9
- Misses 7672 7711 +39
Continue to review full report at Codecov.
|
Test262 conformance changesVM implementation
Fixed tests (6):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for the contribution! Indeed, it's a lot of changes, I guess mostly because the name retrieval is done at parsing time instead of execution time.
I think this is good, it should be faster this way, and we have other examples where this is done this way too.
Thank you for the contribution! It looks pretty good to me!
bors r+ |
With this change an arrow function name is correctly set to the name of the variable: ```javascript const myFunction = () => {}; console.log(myFunction.name); // Prints "myFunction" ``` _Note:_ I'm still getting familiar with the codebase and am pretty new to Rust so I won't be offended if this isn't merged. I am actually surprised I had to make so many changes to give the right code the name it needed. Maybe there is a better way? I'm all ears :)
Pull request successfully merged into main. Build succeeded: |
With this change an arrow function name is correctly set to the name of the variable:
Note: I'm still getting familiar with the codebase and am pretty new to Rust so I won't be offended if this isn't merged. I am actually surprised I had to make so many changes to give the right code the name it needed. Maybe there is a better way? I'm all ears :)