Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: test/mjsunit/regress/regress-5648.js

Issue 2520883002: [parser] Fix scopes in rewriting of for-of and destructuring assignments. (Closed)
Patch Set: Take into account that the scope may have been removed when we get to rewrite. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698