in-statement-position-if-expression-statement-else-statement-strict.js (452B)
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 else Statement 10 negative: 11 phase: parse 12 type: SyntaxError 13 flags: [onlyStrict] 14 ---*/ 15 16 $DONOTEVALUATE(); 17 if (true) {} else function g() {}