Skip to content

SyntaxError not thrown for duplicate parameters in arrow functions #2544

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

Open
theauk opened this issue Aug 26, 2024 · 1 comment
Open

SyntaxError not thrown for duplicate parameters in arrow functions #2544

theauk opened this issue Aug 26, 2024 · 1 comment
Labels
Standards Issue A place where Espruino doesn't conform to the ECMAscript standard

Comments

@theauk
Copy link

theauk commented Aug 26, 2024

ff487e0

Test Case

(a, a) => {  }

Expected Behavior
I would expect to see a syntax error about duplicated parameters not being allowed in this context. Running the test case on other JavaScript engines (Node, Hermes, QuickJS, Deno, Ecargot), I get some version of a duplicated parameter SyntaxError.

@gfwilliams
Copy link
Member

Thanks for these reports! I'll take a look at them when I get a bit of free time.

In the mean time if you or anyone else wants to contribute fixes that'd be awesome!

@gfwilliams gfwilliams added the Standards Issue A place where Espruino doesn't conform to the ECMAscript standard label Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Standards Issue A place where Espruino doesn't conform to the ECMAscript standard
Projects
None yet
Development

No branches or pull requests

2 participants