Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: syntax error if superproperty private name access #1848

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions src/class-elements/super-private-access-invalid.case
Original file line number Diff line number Diff line change
@@ -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:
super[Expression]
super.IdentifierName

template: syntax/invalid
features: [class-methods-private]
---*/

class B {
#x() {}
}

//- heritage
extends B

//- elements
method() {
super.#x();
}