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

valid function defined twice -> incorrect syntax error "duplicate formal parameter" #156

Open
avih opened this issue Feb 16, 2022 · 0 comments

Comments

@avih
Copy link
Contributor

avih commented Feb 16, 2022

With this test file fndup.js:

"use strict";
function x(y) { }
function x(y) { }

As far as I can tell this is a valid file, but it gives the following error:

SyntaxError: fndup.js:3: duplicate formal parameter 'x'
@avih avih changed the title valid function defined twice -> incorrect syntax error "duplicate formal argument" valid function defined twice -> incorrect syntax error "duplicate formal parameter" Feb 16, 2022
ccxvii added a commit that referenced this issue Mar 10, 2022
Duplicate var and function declarations are still allowed.
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

No branches or pull requests

1 participant