-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Duplicate function declarations in blocks should throw early error in sloppy mode #144
Comments
We ran into another compat issue with foxnews.com (serving Akamai's media player): https://code.google.com/p/chromium/issues/detail?id=579395 |
@ianwjhalliday Depends. I tend to think that not throwing an error here is bad for many reasons. If we are forced to support it due to web compat then we have no choice, but let's wait and see what data @syg's telemetry finds. Also perhaps Canary has telemetry enabled (@ajklein)? But I think it's safe to add ye olde pending TC39 consensus label :) |
Consensus is we must allow duplicate func decls in blocks sloppy mode. tc39/ecma262#400 proposes a spec fix for this, but this issue can be closed! |
Expected: Early syntax error. Actual: no error, second function wins always near as I can tell.
Duplicate function names are allowed at top level but not in blocks. Spidermonkey came across web compat issues trying to implement this, so are going to go more slowly. V8 has it in Canary and will test out these semantics in their Beta channel. Hopefully if all goes well there we can fix this bug without worry.
The text was updated successfully, but these errors were encountered: