Add cases for early error deleting private names

This commit is contained in:
Leo Balter 2018-11-07 18:13:15 -05:00
parent 0475c127c4
commit 0575d4d7a8
16 changed files with 148 additions and 22 deletions

View File

@ -0,0 +1,22 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
It's a SyntaxError if delete operator is applied to CallExpression.PrivateName
accessor get method
template: delete-error
features: [class-methods-private, class-fields-public]
---*/
//- infieldsetup
g = this.f;
//- infunctionsetup
var g = this.f;
//- expression
g().#m
//- functiondeclaration
f() {
return this;
}
get #m() {}

View File

@ -0,0 +1,22 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
It's a SyntaxError if delete operator is applied to CallExpression.PrivateName
accessor set method
template: delete-error
features: [class, class-fields-private, class-methods-private, class-fields-public]
---*/
//- infieldsetup
g = this.f;
//- infunctionsetup
var g = this.f;
//- expression
g().#m
//- functiondeclaration
f() {
return this;
}
set #m(arg) {}

View File

@ -2,9 +2,11 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
desc: >
It's a SyntaxError if delete operator is applied to CallExpression.PrivateName
async generator
template: delete-error
features: [class, class-fields-private, class-methods-private, class-fields-public]
features: [class-methods-private, async-iteration]
---*/
//- infieldsetup

View File

@ -2,9 +2,11 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
desc: >
It's a SyntaxError if delete operator is applied to CallExpression.PrivateName
async method
template: delete-error
features: [class, class-fields-private, class-methods-private, class-fields-public]
features: [class-methods-private, async-functions]
---*/
//- infieldsetup

View File

@ -2,9 +2,11 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
desc: >
It's a SyntaxError if delete operator is applied to CallExpression.PrivateName
generator
template: delete-error
features: [class, class-fields-private, class-methods-private, class-fields-public]
features: [class-methods-private, generators]
---*/
//- infieldsetup

View File

@ -2,9 +2,11 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
desc: >
It's a SyntaxError if delete operator is applied to CallExpression.PrivateName
private ordinary method
template: delete-error
features: [class, class-fields-private, class-methods-private, class-fields-public]
features: [class-methods-private]
---*/
//- infieldsetup

View File

@ -0,0 +1,20 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
It's a SyntaxError if delete operator is applied to CallExpression.PrivateName
no referencing class element
template: delete-error
---*/
//- infieldsetup
g = this.f;
//- infunctionsetup
var g = this.f;
//- expression
g().#m
//- functiondeclaration
f() {
return this;
}

View File

@ -2,9 +2,10 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
desc: >
It's a SyntaxError if delete operator is applied to CallExpression.PrivateName
private field
template: delete-error
features: [class, class-fields-private, class-fields-public]
---*/
//- infieldsetup

View File

@ -0,0 +1,16 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
accessor get method
template: delete-error
features: [class-methods-private]
---*/
//- expression
this.#m
//- functiondeclaration
get #m() {}

View File

@ -0,0 +1,16 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
accessor set method
template: delete-error
features: [class-methods-private]
---*/
//- expression
this.#m
//- functiondeclaration
set #m(arg) {}

View File

@ -2,13 +2,15 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
desc: >
It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
async generator
template: delete-error
features: [class-methods-private]
features: [class-methods-private, async-iteration]
---*/
//- expression
this.#m
//- functiondeclaration
async *#m() {}
async *#m() {}

View File

@ -2,13 +2,15 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
desc: >
It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
async method
template: delete-error
features: [class-methods-private]
features: [class-methods-private, async-functions]
---*/
//- expression
this.#m
//- functiondeclaration
async #m() {}
async #m() {}

View File

@ -2,13 +2,15 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
desc: >
It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
generator
template: delete-error
features: [class-methods-private]
features: [class-methods-private, generators]
---*/
//- expression
this.#m
//- functiondeclaration
*#m() {}
*#m() {}

View File

@ -2,7 +2,9 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
desc: >
It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
private ordinary method
template: delete-error
features: [class-methods-private]
---*/

View File

@ -0,0 +1,12 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: >
It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
no referencing class element
template: delete-error
---*/
//- expression
this.#m

View File

@ -2,9 +2,10 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
desc: >
It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName
private field
template: delete-error
features: [class-fields-private]
---*/
//- expression