From cb870f6fd68460384520f0da6ef311be9b4c86ea Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Wed, 20 Apr 2022 19:51:53 +0100 Subject: [PATCH] document v8 quirks (#5430) closes #5428 closes #5429 --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 60cb6ab8..97d5c8a7 100644 --- a/README.md +++ b/README.md @@ -1373,3 +1373,19 @@ To allow for better optimizations, the compiler makes various assumptions: // TypeError: const 'a' has already been declared ``` 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.