Debian Codegraph @

js/src/tests/test262/language/block-scope/syntax/function-declarations/in-statement-position-if-expression-statement-strict.js

raw
1 // |reftest| error:SyntaxError
2 'use strict';
3 // Copyright (C) 2011 the V8 project authors. All rights reserved.
4 // This code is governed by the BSD license found in the LICENSE file.
5 /*---
6 es6id: 13.1
7 description: >
8 function declarations in statement position in strict mode:
9 if ( Expression ) Statement
10 negative:
11 phase: parse
12 type: SyntaxError
13 flags: [onlyStrict]
14 ---*/
15
16 $DONOTEVALUATE();
17 if (true) function g() {}
18