diff options
Diffstat (limited to 'js/src/tests/js1_8/extensions/expclo2.js')
-rw-r--r-- | js/src/tests/js1_8/extensions/expclo2.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/js/src/tests/js1_8/extensions/expclo2.js b/js/src/tests/js1_8/extensions/expclo2.js new file mode 100644 index 000000000..2c192d861 --- /dev/null +++ b/js/src/tests/js1_8/extensions/expclo2.js @@ -0,0 +1,23 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + * Contributor: Brendan Eich + */ + +var summary = "Partial flat expression closure upvar order test"; + +function f(a) { + if (a) { + let b = 42; + let c = function () b+a; + ++b; + return c; + } + return null; +} + +var expect = 44; +var actual = f(1)(); + +reportCompare(expect, actual, summary); |