mirror of
https://github.com/tc39/test262.git
synced 2025-12-01 02:53:15 +01:00
Without declaring #x in the class body, the thrown error could have been about the undeclared private name rather than about the SuperProperty
31 lines
546 B
Plaintext
31 lines
546 B
Plaintext
// Copyright (C) 2018 Jaideep Bhoosreddy (Bloomberg LP). All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
desc: It is syntax error if PrivateName IdentifierName is accessed on SuperProperty
|
|
info: |
|
|
ClassElementName :
|
|
PropertyName
|
|
PrivateName
|
|
|
|
PrivateName ::
|
|
# IdentifierName
|
|
|
|
SuperProperty:
|
|
super[Expression]
|
|
super.IdentifierName
|
|
|
|
template: syntax/invalid
|
|
features: [class-methods-private]
|
|
---*/
|
|
|
|
//- heritage
|
|
extends B
|
|
|
|
//- elements
|
|
#x() {}
|
|
|
|
method() {
|
|
super.#x();
|
|
}
|