test262/test/suite/bestPractice/Sbp_A5_T1.js

19 lines
506 B
JavaScript
Raw Normal View History

2011-09-25 17:38:17 +02:00
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* FunctionDeclaration within a "for-in" Statement is not allowed
*
* @path bestPractice/Sbp_A5_T1.js
* @description Declaring function within a "for-in" Statement
* @onlyStrict
* @negative SyntaxError
* @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
*/
"use strict";
for (x in this) {
function __func(){};
}