blob: 52d550a8784068fea2d3ef64f0f02e1b2978dd3e [file] [log] [blame]
Ben Murdoch61f157c2016-09-16 13:49:30 +01001// 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
5function* g1() {
6 try {
7 throw {};
8 } catch ({a = class extends (yield) {}}) {
9 }
10}
11g1().next(); // crashes without fix
12
13function* g2() {
14 let x = function(){};
15 try {
16 throw {};
17 } catch ({b = class extends x {}}) {
18 }
19}
20g2().next(); // crashes without fix
21
22function* g3() {
23 let x = 42;
24 try {
25 throw {};
26 } catch ({c = (function() { return x })()}) {
27 }
28}
29g3().next(); // throws a ReferenceError without fix