summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/lexical-environment/block-scoped-functions-strict.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/tests/non262/lexical-environment/block-scoped-functions-strict.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/js/src/tests/non262/lexical-environment/block-scoped-functions-strict.js b/js/src/tests/non262/lexical-environment/block-scoped-functions-strict.js
new file mode 100644
index 0000000000..2b780d7dd1
--- /dev/null
+++ b/js/src/tests/non262/lexical-environment/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");