test: syntax error if superproperty private name access

This commit is contained in:
jbhoosreddy 2018-10-09 00:59:16 -04:00 committed by Rick Waldron
parent 36f5d9527f
commit b7a83ecaf3
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
// 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: |
Updated Productions
ClassElementName :
PropertyName
PrivateName
PrivateName ::
# IdentifierName
SuperProperty[Yield, Await]:
super[Expression[+In, ?Yield, ?Await]]
super.IdentifierName
template: syntax/invalid
features: [class-methods-private]
---*/
class B {
#x() {}
}
//- heritage
extends B
//- elements
method() {
super.#x();
}