From b7a83ecaf30b4144419fcbc470936ec9e8a8f0b6 Mon Sep 17 00:00:00 2001 From: jbhoosreddy Date: Tue, 9 Oct 2018 00:59:16 -0400 Subject: [PATCH] test: syntax error if superproperty private name access --- .../super-private-access-invalid.case | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/class-elements/super-private-access-invalid.case 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(); +}