diff options
Diffstat (limited to 'js/src/tests/js1_8/decompilation/regress-346749.js')
-rw-r--r-- | js/src/tests/js1_8/decompilation/regress-346749.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/js/src/tests/js1_8/decompilation/regress-346749.js b/js/src/tests/js1_8/decompilation/regress-346749.js new file mode 100644 index 0000000..ce9ffbf --- /dev/null +++ b/js/src/tests/js1_8/decompilation/regress-346749.js @@ -0,0 +1,31 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + * Contributor: Blake Kaplan + */ + +//----------------------------------------------------------------------------- +var BUGNUMBER = 346749; +var summary = 'let declarations at function level should turn into var declarations'; +var actual = ''; +var expect = ''; + + +//----------------------------------------------------------------------------- +test(); +//----------------------------------------------------------------------------- + +function test() +{ + enterFunc ('test'); + printBugNumber(BUGNUMBER); + printStatus (summary); + + expect = 'function () { var k; }'; + var f = (function () { let k; }); + actual = f + ''; + compareSource(expect, actual, summary); + + exitFunc ('test'); +} |