OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 the V8 project authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 | |
6 var iter = {} | |
7 iter[Symbol.iterator] = () => ({ | |
8 next: () => ({}), | |
9 return: () => {throw 666} | |
10 }); | |
11 | |
12 function* foo() { | |
13 for (let x of iter) {throw 42} | |
14 } | |
15 | |
16 assertThrowsEquals(() => foo().next(), 42); | |
OLD | NEW |