7d6deeb99a
Bug: v8:12563 Change-Id: I564c973d5d03c198bffc8edba8d9a3b7ec66c8e6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3423581 Auto-Submit: Shu-yu Guo <syg@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#78897}
22 lines
536 B
JavaScript
22 lines
536 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 C {
|
|
static #c = C;
|
|
static #m() { return this; }
|
|
static test(C) {
|
|
assertEquals(C?.#m(), C);
|
|
assertEquals((C?.#m)(), C);
|
|
assertEquals(C?.#c?.#m(), C);
|
|
assertEquals((C?.#c?.#m)(), C);
|
|
|
|
assertEquals(C?.#m(42), C);
|
|
assertEquals((C?.#m)(42), C);
|
|
assertEquals(C?.#c?.#m(42), C);
|
|
assertEquals((C?.#c?.#m)(42), C);
|
|
}
|
|
}
|
|
|
|
C.test(C);
|