summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/lexical-environment/block-scoped-functions-annex-b.js
blob: 16c40774cad30c9bf3623b51600bc61f20a34c34 (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
var log = "";

log += typeof f;

{
  log += f();

  function f() {
    return "f1";
  }
}

log += f();

function g() {
  log += typeof h;

  {
    log += h();

    function h() {
      return "h1";
    }
  }

  log += h();
}

g();

reportCompare(log, "undefinedf1f1undefinedh1h1");