Bug 1921345 - Remove global constructor from js/src/vm/SavedStacks.cpp r=arai
[gecko.git] / js / src / tests / test262 / annexB / language / eval-code / direct / global-switch-case-eval-global-existing-fn-no-init.js
blob9e987fa5769cdf1a2e8a17e96c13b80ce2ee31c2
1 // This file was procedurally generated from the following sources:
2 // - src/annex-b-fns/eval-global-existing-fn-no-init.case
3 // - src/annex-b-fns/eval-global/direct-switch-case.template
4 /*---
5 description: Existing variable binding is not modified (Function declaration in the `case` clause of a `switch` statement in eval code)
6 esid: sec-web-compat-evaldeclarationinstantiation
7 flags: [generated, noStrict]
8 info: |
9     B.3.3.3 Changes to EvalDeclarationInstantiation
11     [...]
12     a. If declaredFunctionOrVarNames does not contain F, then
13     [...]
14 ---*/
16 eval(
17   'assert.sameValue(f(), "outer declaration");switch (1) {' +
18   '  case 1:' +
19   '    function f() { return "inner declaration"; }' +
20   '}\
21   function f() {\
22     return "outer declaration";\
23   }'
26 reportCompare(0, 0);