aboutsummaryrefslogtreecommitdiffstats
path: root/src/annex-b-fns/global-existing-fn-no-init.case
blob: 80c0d2664b601116b4396c295d9865f807abb1ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Existing variable binding is not modified
template: global
info: |
    B.3.3.2 Changes to GlobalDeclarationInstantiation

    [...]
    1. Let fnDefinable be ? envRec.CanDeclareGlobalFunction(F).
    2. If fnDefinable is true, then
---*/

//- setup
assert.sameValue(f(), 'outer declaration');
//- body
return 'inner declaration';
//- teardown
function f() {
  return 'outer declaration';
}