Index: test/mjsunit/for-in.js |
diff --git a/test/mjsunit/for-in.js b/test/mjsunit/for-in.js |
index 29d7445351ffa1788af1172a574e37e788cde9dd..94b39cfd57d67d747d99909253c75dd56e7cac76 100644 |
--- a/test/mjsunit/for-in.js |
+++ b/test/mjsunit/for-in.js |
@@ -25,8 +25,6 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Flags: --noharmony-for-in |
- |
function props(x) { |
var array = []; |
for (var p in x) array.push(p); |
@@ -141,6 +139,13 @@ function props(x) { |
(function forInInitialize() { |
for (var hest = 'hest' in {}) { } |
assertEquals('hest', hest, "empty-no-override"); |
+ |
+ // Lexical variables are disallowed |
+ assertThrows("for (const x = 0 in {});", SyntaxError); |
+ assertThrows("for (let x = 0 in {});", SyntaxError); |
+ |
+ // In strict mode, var is disallowed |
+ assertThrows("'use strict'; for (var x = 0 in {});", SyntaxError); |
})(); |
(function forInObjects() { |