diff options
Diffstat (limited to 'js/src/tests/ecma_6/LexicalEnvironment/block-scoped-functions-strict.js')
-rw-r--r-- | js/src/tests/ecma_6/LexicalEnvironment/block-scoped-functions-strict.js | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/LexicalEnvironment/block-scoped-functions-strict.js b/js/src/tests/ecma_6/LexicalEnvironment/block-scoped-functions-strict.js new file mode 100644 index 000000000..2b780d7dd --- /dev/null +++ b/js/src/tests/ecma_6/LexicalEnvironment/block-scoped-functions-strict.js @@ -0,0 +1,45 @@ +"use strict" + +var log = ""; + +function f() { + return "f0"; +} + +log += f(); + +{ + log += f(); + + function f() { + return "f1"; + } + + log += f(); +} + +log += f(); + +function g() { + function h() { + return "h0"; + } + + log += h(); + + { + log += h(); + + function h() { + return "h1"; + } + + log += h(); + } + + log += h(); +} + +g(); + +reportCompare(log, "f0f1f1f0h0h1h1h0"); |