summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/lexical-environment/block-scoped-functions-strict.js
blob: 2b780d7dd1fb3381b4ddc7fbe4fead5433e16c15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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");