test262/test/language/expressions/class/elements/fields-multiple-definitions-static-private-methods-proxy.js
Mike Pennisi f26c2a11bd Remove unnecessary "includes" directives
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.
2019-09-25 13:59:24 -04:00

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();
});