v8/test/mjsunit/regress/regress-v8-11261.js
Marja Hölttä 6f290ef767 [parser] Fix parsing "new super.x"
It's not "(new super).x" but "new (super.x)".

Bug: v8:11261
Change-Id: Ifc9cae038c1dc8fcdb096e213b4ac79ea20e9238
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593248
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71763}
2020-12-15 13:38:04 +00:00

11 lines
349 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.
let obj = ({ __proto__: { x: class {} }, y() { return new super.x; } });
obj.y();
class A { static a = class {} }
class B extends A { static b() { return new super.a(); } }
B.b();