| 1 |
// This file was procedurally generated from the following sources: |
| 2 |
// - src/annex-b-fns/eval-func-existing-block-fn-no-init.case |
| 3 |
// - src/annex-b-fns/eval-func/direct-switch-dflt.template |
| 4 |
/*--- |
| 5 |
description: Does not re-initialize binding created by similar forms (Funtion declaration in the `default` clause of a `switch` statement in eval code in the global scope) |
| 6 |
esid: sec-web-compat-evaldeclarationinstantiation |
| 7 |
es6id: B.3.3.3 |
| 8 |
flags: [generated, noStrict] |
| 9 |
info: | |
| 10 |
B.3.3.3 Changes to EvalDeclarationInstantiation |
| 11 |
|
| 12 |
[...] |
| 13 |
a. If declaredFunctionOrVarNames does not contain F, then |
| 14 |
[...] |
| 15 |
---*/ |
| 16 |
var init; |
| 17 |
|
| 18 |
(function() { |
| 19 |
eval( |
| 20 |
'init = f;\ |
| 21 |
\ |
| 22 |
{\ |
| 23 |
function f() {}\ |
| 24 |
}switch (1) {' + |
| 25 |
' default:' + |
| 26 |
' function f() { }' + |
| 27 |
'}\ |
| 28 |
' |
| 29 |
); |
| 30 |
}()); |
| 31 |
|
| 32 |
assert.sameValue(init, undefined); |