diff options
-rw-r--r-- | lib/scope.js | 1 | ||||
-rw-r--r-- | test/compress/screw-ie8.js | 66 |
2 files changed, 67 insertions, 0 deletions
diff --git a/lib/scope.js b/lib/scope.js index df7b2076..8e766a56 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -235,6 +235,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){ ref.reference(options); }); node.thedef = def; + node.reference(options); return true; } })); diff --git a/test/compress/screw-ie8.js b/test/compress/screw-ie8.js index 5d6f1e2c..66559b0b 100644 --- a/test/compress/screw-ie8.js +++ b/test/compress/screw-ie8.js @@ -325,3 +325,69 @@ issue_2120_2: { } expect_stdout: "PASS" } + +issue_2254_1: { + mangle = { + ie8: false, + } + input: { + "eeeeee"; + try { + console.log(f("PASS")); + } catch (e) {} + function f(s) { + try { + throw "FAIL"; + } catch (e) { + return s; + } + } + } + expect: { + "eeeeee"; + try { + console.log(f("PASS")); + } catch (e) {} + function f(e) { + try { + throw "FAIL"; + } catch (t) { + return e; + } + } + } + expect_stdout: "PASS" +} + +issue_2254_2: { + mangle = { + ie8: true, + } + input: { + "eeeeee"; + try { + console.log(f("PASS")); + } catch (e) {} + function f(s) { + try { + throw "FAIL"; + } catch (e) { + return s; + } + } + } + expect: { + "eeeeee"; + try { + console.log(f("PASS")); + } catch (e) {} + function f(t) { + try { + throw "FAIL"; + } catch (e) { + return t; + } + } + } + expect_stdout: "PASS" +} |