Skip to content
Snippets Groups Projects
Commit 87e86669 authored by Leo Balter's avatar Leo Balter Committed by Rick Waldron
Browse files

Add tests for private method/fields unnescapable token

parent d857bd6f
No related branches found
No related tags found
No related merge requests found
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: The pound signal in the private async generator cannot be escaped
template: syntax/invalid
info: |
PrivateName::
# IdentifierName
U+0023 is the escape sequence for #
features: [class-methods-private, async-iteration]
---*/
//- elements
async * \u0023m() { return 42; }
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: The pound signal in the private async method cannot be escaped
template: syntax/invalid
info: |
PrivateName::
# IdentifierName
U+0023 is the escape sequence for #
features: [class-methods-private, async-functions]
---*/
//- elements
async \u0023m() { return 42; }
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: The pound signal in the private reference cannot be escaped
template: syntax/invalid
info: |
PrivateName ::
# IdentifierName
MemberExpression :
MemberExpression . PrivateName
CallExpression :
CallExpression . PrivateName
U+0023 is the escape sequence for #
features: [class-fields-private]
---*/
//- elements
method() {
foo().\u0023field;
}
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: The pound signal in the private field cannot be escaped
template: syntax/invalid
info: |
PrivateName::
# IdentifierName
U+0023 is the escape sequence for #
features: [class-fields-private]
---*/
//- elements
\u0023field;
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: The pound signal in the private generator cannot be escaped
template: syntax/invalid
info: |
PrivateName::
# IdentifierName
U+0023 is the escape sequence for #
features: [class-methods-private, generators]
---*/
//- elements
* \u0023m() { return 42; }
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: The pound signal in the private reference cannot be escaped
template: syntax/invalid
info: |
PrivateName ::
# IdentifierName
MemberExpression :
MemberExpression . PrivateName
CallExpression :
CallExpression . PrivateName
U+0023 is the escape sequence for #
features: [class-fields-private]
---*/
//- elements
method() {
this.\u0023field;
}
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: The pound signal in the private method cannot be escaped
template: syntax/invalid
info: |
PrivateName::
# IdentifierName
U+0023 is the escape sequence for #
features: [class-methods-private]
---*/
//- elements
\u0023m() { return 42; }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment