-
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
Inlined function reassigns const variable #2843
Comments
This is a dup of #2842 and can be closed. |
Yup, just hoping to offer a different repro. |
An ideal uglify test case is a small standalone program that prints out something with Promises/async/await currently don't play well with the uglify test sandbox because their actions run asynchronously in the event loop. |
Bug report or feature request?
Bug report.
ES5 or ES6+ input?
ES6
Uglify version (
uglifyjs -V
)uglify-es 3.3.8
JavaScript input
The
uglifyjs
CLI command executed orminify()
options used.uglify-es --ecma 6 -b -c -m --harmony -- uglify-bug.js
JavaScript output or error produced.
I believe this is the same (or related to) #2842 but I wanted to contribute another test case. This is the smallest test case I could make - it didn't repro without the nested promise, or the function returned from a function.
The error is in the assignment
n = n
in the inlinedcatch
handler - it fails with "Assignment to constant variable."The text was updated successfully, but these errors were encountered: