From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../block-scoped-functions-strict.js | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 js/src/tests/non262/lexical-environment/block-scoped-functions-strict.js (limited to 'js/src/tests/non262/lexical-environment/block-scoped-functions-strict.js') 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"); -- cgit v1.2.3