blob: 299decb82c30099cca7f8e88ea19473ed38c1e13 (
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
|
// 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: func
info: |
B.3.3.1 Changes to FunctionDeclarationInstantiation
[...]
2. If instantiatedVarNames does not contain F, then
[...]
---*/
//- setup
var init;
//- before
init = f;
//- body
return 'inner declaration';
//- after
function f() {
return 'outer declaration';
}
//- teardown
assert.sameValue(init(), 'outer declaration');
|