aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/evaluate.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js
index 73c982f2..2b1bbc01 100644
--- a/test/compress/evaluate.js
+++ b/test/compress/evaluate.js
@@ -3142,3 +3142,36 @@ issue_4480: {
}
expect_stdout: "PASS"
}
+
+issue_4552: {
+ options = {
+ evaluate: true,
+ keep_fnames: true,
+ reduce_vars: true,
+ toplevel: true,
+ unused: true,
+ }
+ input: {
+ var a = function f(b) {
+ return function() {
+ b++;
+ try {
+ return b;
+ } catch (e) {}
+ }();
+ }();
+ console.log(a);
+ }
+ expect: {
+ var a = function f(b) {
+ return function() {
+ b++;
+ try {
+ return b;
+ } catch (e) {}
+ }();
+ }();
+ console.log(a);
+ }
+ expect_stdout: "NaN"
+}