Index: test/mjsunit/harmony/iterator-close.js |
diff --git a/test/mjsunit/harmony/iterator-close.js b/test/mjsunit/harmony/iterator-close.js |
index 09e01533077b6bd5b2d4860584c63149be42d07d..02dc9d326f35ec07cd20dfd0d49326ee551bcdd1 100644 |
--- a/test/mjsunit/harmony/iterator-close.js |
+++ b/test/mjsunit/harmony/iterator-close.js |
@@ -1007,6 +1007,26 @@ function* g() { yield 42; return 88 }; |
assertThrowsEquals(() => { |
(([x]) => x)(g()); |
}, 666); |
+ |
+ assertThrowsEquals(() => { |
+ var [...x] = g(); |
+ }, 666); |
+ |
+ assertThrowsEquals(() => { |
+ let [...x] = g(); |
+ }, 666); |
+ |
+ assertThrowsEquals(() => { |
+ const [...x] = g(); |
+ }, 666); |
+ |
+ assertThrowsEquals(() => { |
+ [...x] = g(); |
+ }, 666); |
+ |
+ assertThrowsEquals(() => { |
+ (([...x]) => x)(g()); |
+ }, 666); |
} |
@@ -1051,6 +1071,26 @@ function* g() { yield 42; return 88 }; |
assertThrowsEquals(() => { |
(([x]) => x)(g()); |
}, 666); |
+ |
+ assertThrowsEquals(() => { |
+ var [...x] = g(); |
+ }, 666); |
+ |
+ assertThrowsEquals(() => { |
+ let [...x] = g(); |
+ }, 666); |
+ |
+ assertThrowsEquals(() => { |
+ const [...x] = g(); |
+ }, 666); |
+ |
+ assertThrowsEquals(() => { |
+ [...x] = g(); |
+ }, 666); |
+ |
+ assertThrowsEquals(() => { |
+ (([...x]) => x)(g()); |
+ }, 666); |
} |
@@ -1095,6 +1135,26 @@ function* g() { yield 42; return 88 }; |
assertThrowsEquals(() => { |
(([x]) => x)(g()); |
}, 666); |
+ |
+ assertThrowsEquals(() => { |
+ var [...x] = g(); |
+ }, 666); |
+ |
+ assertThrowsEquals(() => { |
+ let [...x] = g(); |
+ }, 666); |
+ |
+ assertThrowsEquals(() => { |
+ const [...x] = g(); |
+ }, 666); |
+ |
+ assertThrowsEquals(() => { |
+ [...x] = g(); |
+ }, 666); |
+ |
+ assertThrowsEquals(() => { |
+ (([...x]) => x)(g()); |
+ }, 666); |
} |