v8/test/mjsunit/regress/regress-622663.js
nikolaos 61c137c811 Fix bug with re-scoping arrow function parameter initializers
When re-scoping arrow function parameter initializers, temporaries
should be moved from the closure of the old scope to the closure of
the new scope, if necessary.

R=adamk@chromium.org, rossberg@chromium.org
BUG=chromium:622663
LOG=N

Review-Url: https://codereview.chromium.org/2083083007
Cr-Commit-Position: refs/heads/master@{#37335}
2016-06-28 15:10:17 +00:00

15 lines
465 B
JavaScript

+// Copyright 2016 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: --no-lazy
(function() {
try { (y = [...[]]) => {} } catch(_) {} // will core dump, if not fixed
})();
(function() {
try { ((y = [...[]]) => {})(); } catch(_) {} // will core dump, if not fixed,
// even without --no-lazy
})();