document v8 quirks (#5430)

closes #5428
closes #5429
This commit is contained in:
Alex Lam S.L
2022-04-20 19:51:53 +01:00
committed by GitHub
parent a0c0c294c5
commit cb870f6fd6

View File

@@ -1373,3 +1373,19 @@ To allow for better optimizations, the compiler makes various assumptions:
// TypeError: const 'a' has already been declared // TypeError: const 'a' has already been declared
``` ```
UglifyJS may modify the input which in turn may suppress those errors. UglifyJS may modify the input which in turn may suppress those errors.
- Later versions of Chrome and Node.js will give incorrect results with the
following:
```javascript
try {
class A {
static 42;
static get 42() {}
}
console.log("PASS");
} catch (e) {
console.log("FAIL");
}
// Expected: "PASS"
// Actual: "FAIL"
```
UglifyJS may modify the input which in turn may suppress those errors.