document v8 quirks (#5565)

closes #5564
This commit is contained in:
Alex Lam S.L
2022-07-16 17:22:16 +01:00
committed by GitHub
parent 5792f30175
commit 685ab357cc

View File

@@ -1359,7 +1359,7 @@ To allow for better optimizations, the compiler makes various assumptions:
// SyntaxError: The left-hand side of a for-of loop may not be 'async'. // SyntaxError: The left-hand side of a for-of loop may not be 'async'.
``` ```
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 - Some versions of Chrome and Node.js will give incorrect results with the
following: following:
```javascript ```javascript
console.log({ console.log({
@@ -1368,9 +1368,15 @@ To allow for better optimizations, the compiler makes various assumptions:
return "FAIL"; return "FAIL";
}, },
[42]: "PASS", [42]: "PASS",
}[42], {
...console,
get 42() {
return "FAIL";
},
42: "PASS",
}[42]); }[42]);
// Expected: "PASS" // Expected: "PASS PASS"
// Actual: "FAIL" // Actual: "PASS FAIL"
``` ```
UglifyJS may modify the input which in turn may suppress those errors. UglifyJS may modify the input which in turn may suppress those errors.
- Earlier versions of JavaScript will throw `TypeError` with the following: - Earlier versions of JavaScript will throw `TypeError` with the following: