diff options
author | David Fugate <dfugate@microsoft.com> | 2012-02-24 14:28:50 -0800 |
---|---|---|
committer | David Fugate <dfugate@microsoft.com> | 2012-02-24 14:28:50 -0800 |
commit | d9e409ac1bf86d3d7bba85e9be2d5663de11b1a1 (patch) | |
tree | a5f902b88d1ed68190e763d85bc84a3e15920329 /test/suite/bestPractice/Sbp_12.6.4_A13_T3.js | |
parent | 35af99abe1eb03de767c90f4f4e9bfb7c452bc90 (diff) |
https://bugs.ecmascript.org/show_bug.cgi?id=269
Extension clause permits function declarations more or less anywhere.
Moved four such negative test cases to best practices directory.
Diffstat (limited to 'test/suite/bestPractice/Sbp_12.6.4_A13_T3.js')
-rw-r--r-- | test/suite/bestPractice/Sbp_12.6.4_A13_T3.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/suite/bestPractice/Sbp_12.6.4_A13_T3.js b/test/suite/bestPractice/Sbp_12.6.4_A13_T3.js new file mode 100644 index 000000000..f76366167 --- /dev/null +++ b/test/suite/bestPractice/Sbp_12.6.4_A13_T3.js @@ -0,0 +1,19 @@ +// 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_12.6.4_A13_T3.js + * @description Declaring function within a "for-in" Statement that is within function declaration + * @negative + */ + +function(){ + +for(x in this){ + function __func(){}; +}; + +}; + |