Mark Miller 9e39b942b5 Moved test/suite/converted to its new home, as our new canonical
source starting NOW, to test/suite.
2011-09-25 14:44:28 -07:00

22 lines
553 B
JavaScript

// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* Function declaration within an "if" statement in strict code is not
* allowed
*
* @path bestPractice/Sbp_A2_T1.js
* @description Declaring function within a strict "if" statement
* @onlyStrict
* @negative SyntaxError
* @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
*/
"use strict";
if (true) {
function __func(){};
} else {
function __func(){};
}