fix corner cases with spread syntax (#4358)

This commit is contained in:
Alex Lam S.L
2020-12-10 22:59:21 +00:00
committed by GitHub
parent 77e1bda426
commit 57105b299e
5 changed files with 357 additions and 60 deletions

View File

@@ -1175,6 +1175,8 @@ To allow for better optimizations, the compiler makes various assumptions:
- Object properties can be added, removed and modified (not prevented with
`Object.defineProperty()`, `Object.defineProperties()`, `Object.freeze()`,
`Object.preventExtensions()` or `Object.seal()`).
- Iteration order of keys over an object which contains spread syntax in later
versions of Chrome and Node.js may be altered.
- When `toplevel` is enabled, UglifyJS effectively assumes input code is wrapped
within `function(){ ... }`, thus forbids aliasing of declared global variables:
```js