aboutsummaryrefslogtreecommitdiff
path: root/test/compress/functions.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/functions.js')
-rw-r--r--test/compress/functions.js39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js
index 4e65b128..4ed0dc1b 100644
--- a/test/compress/functions.js
+++ b/test/compress/functions.js
@@ -5076,3 +5076,42 @@ issue_4186: {
}
expect_stdout: "function"
}
+
+issue_4233: {
+ options = {
+ functions: true,
+ reduce_vars: true,
+ unused: true,
+ }
+ input: {
+ (function() {
+ try {
+ var a = function() {};
+ try {
+ throw 42;
+ } catch (a) {
+ (function() {
+ console.log(typeof a);
+ })();
+ var a;
+ }
+ } catch (e) {}
+ })();
+ }
+ expect: {
+ (function() {
+ try {
+ var a = function() {};
+ try {
+ throw 42;
+ } catch (a) {
+ (function() {
+ console.log(typeof a);
+ })();
+ var a;
+ }
+ } catch (e) {}
+ })();
+ }
+ expect_stdout: "number"
+}