89a64f04d1
We don't eagerly throw for assignments to calls; see v8:4480. They are simply turned into assignments to Property instead. We need to record a declaration error, however. Otherwise we'll end up with a Property in a declaration context. To reduce the scope of the lazy throwing, in this fix I record a pattern error instead, making calls as assignment target in a destructuring assignment context throw eagerly. Bug: chromium:916288 Change-Id: If94a46b5d2b65c3549c641e0e19135c6c8af7a9a Reviewed-on: https://chromium-review.googlesource.com/c/1384084 Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#58357}
6 lines
208 B
JavaScript
6 lines
208 B
JavaScript
// Copyright 2018 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.
|
|
|
|
assertThrows("(a()=0)=>0", SyntaxError)
|