Debian Codegraph @

js/src/tests/test262/language/statements/function/enable-strict-via-outer-body.js

raw
1 // |reftest| error:SyntaxError
2 // Copyright (c) 2012 Ecma International. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 info: |
7 Refer 13;
8 The production FunctionBody : SourceElementsopt is evaluated as follows:
9 es5id: 13.0-11-s
10 description: >
11 Strict Mode - SourceElements is evaluated as strict mode code when
12 the code of this FunctionBody with an inner function which is in
13 strict mode
14 negative:
15 phase: parse
16 type: SyntaxError
17 flags: [noStrict]
18 ---*/
19
20 $DONOTEVALUATE();
21
22 function _13_0_11_fun() {
23 "use strict";
24 function _13_0_11_inner() {
25 eval = 42;
26 }
27 }