diff --git a/src/class-elements/super-private-access-invalid.case b/src/class-elements/super-private-access-invalid.case new file mode 100644 index 0000000000..475991dd24 --- /dev/null +++ b/src/class-elements/super-private-access-invalid.case @@ -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(); +}