diff --git a/test/mjsunit/es6/regress/regress-6322.js b/test/mjsunit/es6/regress/regress-6322.js index 41f66171ed..8ec49fb0c8 100644 --- a/test/mjsunit/es6/regress/regress-6322.js +++ b/test/mjsunit/es6/regress/regress-6322.js @@ -4,3 +4,8 @@ // Crash with --verify-heap (function*() { for (let { a = class b { } } of [{}]) { } })().next(); +(function() { for (let { a = class b { } } of [{}]) { } })(); +(function() { var a; for ({ a = class b { } } of [{}]) { } })(); + +(function() { for (let [a = class b { } ] = [[]]; ;) break; })(); +(function() { var a; for ([a = class b { } ] = [[]]; ;) break; })(); diff --git a/test/mjsunit/harmony/regress/regress-6322.js b/test/mjsunit/harmony/regress/regress-6322.js new file mode 100644 index 0000000000..9c312a35a5 --- /dev/null +++ b/test/mjsunit/harmony/regress/regress-6322.js @@ -0,0 +1,9 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Flags: --harmony-async-iteration + +// Crash with --verify-heap +(async function() { for await (let { a = class b { } } of [{}]) { } })(); +(async function() { var a; for await ({ a = class b { } } of [{}]) { } })();