| 1 |
// This file was procedurally generated from the following sources: |
| 2 |
// - src/annex-b-fns/func-existing-var-no-init.case |
| 3 |
// - src/annex-b-fns/func/switch-dflt.template |
| 4 |
/*--- |
| 5 |
description: Existing variable binding is not modified (Funtion declaration in the `default` clause of a `switch` statement in function scope) |
| 6 |
esid: sec-web-compat-functiondeclarationinstantiation |
| 7 |
es6id: B.3.3.1 |
| 8 |
flags: [generated, noStrict] |
| 9 |
info: | |
| 10 |
B.3.3.1 Changes to FunctionDeclarationInstantiation |
| 11 |
|
| 12 |
[...] |
| 13 |
2. If instantiatedVarNames does not contain F, then |
| 14 |
[...] |
| 15 |
---*/ |
| 16 |
var init; |
| 17 |
|
| 18 |
(function() { |
| 19 |
var f = 123; |
| 20 |
init = f; |
| 21 |
|
| 22 |
switch (1) { |
| 23 |
default: |
| 24 |
function f() { } |
| 25 |
} |
| 26 |
|
| 27 |
|
| 28 |
}()); |
| 29 |
|
| 30 |
assert.sameValue(init, 123); |