132152f616
Only rewind destructuring assignments if we actually preparsed the arrow function. For the case of single-expression bodies, we don't preparse, but we were previously erroneously rewinding. Bug: v8:6970 Change-Id: I38e15a8a5bdb05abee3bafe7bbd7736b55a6950b Reviewed-on: https://chromium-review.googlesource.com/733950 Reviewed-by: Marja Hölttä <marja@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#48883}
7 lines
243 B
JavaScript
7 lines
243 B
JavaScript
// 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.
|
|
|
|
assertEquals(42, (({a = {b} = {b: 42}}) => a.b)({}));
|
|
assertEquals(42, b);
|