v8/test/mjsunit/regress/regress-crbug-1060023.js
Toon Verwaest 4561500ee4 [parser] Already break the expression scope chain for function parameters
Otherwise we'll invalidly propagate information from default function parameters outwards to outer arrow scopes.

Bug: chromium:1060023
Change-Id: Id43ecb5e1d354d5250a80c2a4f7e3129759041d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2134006
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66964}
2020-04-02 13:16:55 +00:00

11 lines
315 B
JavaScript

// Copyright 2020 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.
class b extends RegExp {
exec() {
(function() { (a = (function({} = this) {})) => {} })
}
}
assertThrows(()=>'a'.match(new b), TypeError);