mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
The values defined by the referenced files are not used by these tests. This makes their inclusion superfluous, which needlessly increases the time to execute the tests and may confuse some readers.
40 lines
715 B
JavaScript
40 lines
715 B
JavaScript
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
description: Static private methods not accessible via default Proxy handler
|
|
esid: prod-FieldDefinition
|
|
features: [class, class-static-methods-private]
|
|
info: |
|
|
ClassElement :
|
|
...
|
|
static FieldDefinition ;
|
|
|
|
FieldDefinition :
|
|
ClassElementName Initializer_opt
|
|
|
|
ClassElementName :
|
|
PrivateName
|
|
|
|
PrivateName :
|
|
# IdentifierName
|
|
|
|
---*/
|
|
|
|
|
|
var C = class {
|
|
static #x(value) {
|
|
return 1;
|
|
}
|
|
static x() {
|
|
return this.#x();
|
|
}
|
|
}
|
|
|
|
var P = new Proxy(C, {});
|
|
|
|
assert.sameValue(C.x(), 1);
|
|
assert.throws(TypeError, function() {
|
|
P.x();
|
|
});
|