test262/src/class-elements/private-field-usage.case

31 lines
917 B
Plaintext

// Copyright (C) 2018 Jaideep Bhoosreddy (Bloomberg LP). All rights reserved.
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: PrivateName CallExpression usage (private field)
info: |
Updated Productions
CallExpression[Yield, Await]:
CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await]
SuperCall[?Yield, ?Await]
CallExpression[?Yield, ?Await]Arguments[?Yield, ?Await]
CallExpression[?Yield, ?Await][Expression[+In, ?Yield, ?Await]]
CallExpression[?Yield, ?Await].IdentifierName
CallExpression[?Yield, ?Await]TemplateLiteral[?Yield, ?Await]
CallExpression[?Yield, ?Await].PrivateName
template: productions
features: [class-fields-private]
---*/
//- elements
#m = 'test262';
//- privateinspectionfunctions
method() {
return this.#m;
}
//- assertions
assert.sameValue(c.method(), 'test262');