mirror of
https://github.com/tc39/test262.git
synced 2025-07-21 21:14:45 +02:00
Add cases for early error deleting private names
This commit is contained in:
parent
0475c127c4
commit
0575d4d7a8
@ -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() {}
|
@ -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) {}
|
@ -2,9 +2,11 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// 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
|
template: delete-error
|
||||||
features: [class, class-fields-private, class-methods-private, class-fields-public]
|
features: [class-methods-private, async-iteration]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//- infieldsetup
|
//- infieldsetup
|
||||||
|
@ -2,9 +2,11 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// 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
|
template: delete-error
|
||||||
features: [class, class-fields-private, class-methods-private, class-fields-public]
|
features: [class-methods-private, async-functions]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//- infieldsetup
|
//- infieldsetup
|
||||||
|
@ -2,9 +2,11 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// 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
|
template: delete-error
|
||||||
features: [class, class-fields-private, class-methods-private, class-fields-public]
|
features: [class-methods-private, generators]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//- infieldsetup
|
//- infieldsetup
|
||||||
|
@ -2,9 +2,11 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// 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
|
template: delete-error
|
||||||
features: [class, class-fields-private, class-methods-private, class-fields-public]
|
features: [class-methods-private]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//- infieldsetup
|
//- infieldsetup
|
||||||
|
@ -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;
|
||||||
|
}
|
@ -2,9 +2,10 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// 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
|
template: delete-error
|
||||||
features: [class, class-fields-private, class-fields-public]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//- infieldsetup
|
//- infieldsetup
|
||||||
|
@ -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() {}
|
@ -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) {}
|
@ -2,9 +2,11 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// 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
|
template: delete-error
|
||||||
features: [class-methods-private]
|
features: [class-methods-private, async-iteration]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//- expression
|
//- expression
|
||||||
|
@ -2,9 +2,11 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// 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
|
template: delete-error
|
||||||
features: [class-methods-private]
|
features: [class-methods-private, async-functions]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//- expression
|
//- expression
|
||||||
|
@ -2,9 +2,11 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// 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
|
template: delete-error
|
||||||
features: [class-methods-private]
|
features: [class-methods-private, generators]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//- expression
|
//- expression
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// 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
|
template: delete-error
|
||||||
features: [class-methods-private]
|
features: [class-methods-private]
|
||||||
---*/
|
---*/
|
||||||
|
@ -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
|
@ -2,9 +2,10 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// 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
|
template: delete-error
|
||||||
features: [class-fields-private]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
//- expression
|
//- expression
|
||||||
|
Loading…
x
Reference in New Issue
Block a user