support arrow function (#4385)

This commit is contained in:
Alex Lam S.L
2020-12-17 10:23:41 +00:00
committed by GitHub
parent 75e9fd8417
commit a96f087ac3
11 changed files with 732 additions and 117 deletions

View File

@@ -1209,3 +1209,11 @@ To allow for better optimizations, the compiler makes various assumptions:
`function({}, arguments) {}` will result in `SyntaxError` in earlier versions
of Chrome and Node.js - UglifyJS may modify the input which in turn may
suppress those errors.
- Later versions of JavaScript will throw `SyntaxError` with the following:
```js
a => {
let a;
};
// SyntaxError: Identifier 'a' has already been declared
```
UglifyJS may modify the input which in turn may suppress those errors.