Index: test/mjsunit/harmony/destructuring.js |
diff --git a/test/mjsunit/harmony/destructuring.js b/test/mjsunit/harmony/destructuring.js |
index 8287220965b3ba78f6b46b0aa4dc0136d8559c57..904058618ad23cb5520bba639a8fb14615b2c5ca 100644 |
--- a/test/mjsunit/harmony/destructuring.js |
+++ b/test/mjsunit/harmony/destructuring.js |
@@ -1097,3 +1097,9 @@ |
assertThrows( |
function(){ eval("(class{foo(a, {}) {'use strict';}});") }, SyntaxError); |
})(); |
+ |
+(function TestLegacyConstDestructuringInForLoop() { |
+ var result; |
+ for (const {foo} of [{foo: 1}]) { result = foo; } |
+ assertEquals(1, result); |
+})(); |