-
-
Notifications
You must be signed in to change notification settings - Fork 222
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 declaration in nested function that has a let variable with same name as function. #226
Comments
Thanks! Hmm.. This is a tricky one. |
This is not a problem anymore in latest babili. |
@boopathi Using babili 0.1.2 I still got this error. Had to go and change variable names and it seems to work now. Not 100% sure, still waiting for it to process. |
@slapbox can you give an sample code for the issue? |
|
I tried with the 0.2.0 version and I cannot reproduce the error with your sample code. |
Ah I didn't realize there was a 0.2.0 under the rename. I'm still on 0.1.2. I assume the issue is resolved. I'll try 0.2.0 later and if I find otherwise I'll update you. Thanks very much. |
Hey babili awesome folks. Thanks for all your work!
I think I've found a bug where babili throws a "Duplicate declaration" error when I have a nested named function whose name is the same as a let variable inside the function.
Here's a reduced repro case:
http://babeljs.io/repl/#?babili=true&evaluate=true&lineWrap=false&presets=&code=var%20sayHello%20%20%3D%20function(name)%20%7B%0A%20%20'use%20strict'%3B%0A%20%20%0A%20%20function%20foo(callback2)%20%7B%0A%20%20%20%20let%20foo%20%3D%20callback2()%3B%0A%20%20%20%20return%20%22hello%2C%20%22%20%2B%20foo%3B%0A%20%20%7D%0A%20%20%0A%20%20return%20foo(()%3D%3Ename)%3B%0A%7D&experimental=true&loose=false&spec=false&playground=false
This code snippet runs fine in latest Chrome, so I'm pretty sure it's valid ES2015. Let me know if you need any more info, and thanks again!
The text was updated successfully, but these errors were encountered: