diff options
Diffstat (limited to 'test/compress/yields.js')
-rw-r--r-- | test/compress/yields.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/compress/yields.js b/test/compress/yields.js index 5761d85e..9df533b9 100644 --- a/test/compress/yields.js +++ b/test/compress/yields.js @@ -1216,3 +1216,33 @@ issue_5032_webkit: { ] node_version: ">=4" } + +issue_5034: { + options = { + functions: true, + reduce_vars: true, + unused: true, + } + input: { + console.log(function() { + var yield = function f() { + return function*() { + return f; + }; + }; + return yield()().next().value === yield; + }() ? "PASS" : "FAIL"); + } + expect: { + console.log(function() { + var yield = function f() { + return function*() { + return f; + }; + }; + return yield()().next().value === yield; + }() ? "PASS" : "FAIL"); + } + expect_stdout: "PASS" + node_version: ">=4" +} |