Revision control

Copy as Markdown

// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: annexB/language/eval-code/direct/func-switch-case-
name: >
Function declaration in the `case` clause of a `switch` statement in eval code
esid: sec-web-compat-evaldeclarationinstantiation
es6id: B.3.3.3
flags: [noStrict]
---*/
(function(/*{ params }*/) {
eval(
'/*{ before }*/switch (1) {' +
' case 1:' +
' function f() { /*{ body }*/ }' +
'}\
/*{ after }*/'
);
}(/*{ args }*/));