v8/test/mjsunit/regress/regress-crbug-941703.js
Toon Verwaest 44382e945a [parser] Clear is_parenthesized on ThisExpression when accessing it
Otherwise (this) will leak into a later this=> making it seem like a valid
arrow function head.

Bug: chromium:941703
Change-Id: I5c3ff70f1d525ec0da53b401a0bfec4c1ee7812f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1601260
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61345}
2019-05-08 15:44:06 +00:00

6 lines
215 B
JavaScript

// Copyright 2019 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("(this) , this =>", SyntaxError);