test: Early error private methods delete (#1343)

This commit is contained in:
jbhoosreddy 2018-09-11 14:46:22 -04:00
parent 6bedd8f1c6
commit 227a85b9d3
10 changed files with 136 additions and 0 deletions

View File

@ -0,0 +1,20 @@
// Copyright (C) 20178 Bloomberg LP. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Syntax error if you call delete on call expressions . private 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;
}
async *#m() {}

View File

@ -0,0 +1,20 @@
// Copyright (C) 20178 Bloomberg LP. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Syntax error if you call delete on call expressions . private 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;
}
async #m() {}

View File

@ -0,0 +1,20 @@
// Copyright (C) 20178 Bloomberg LP. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Syntax error if you call delete on call expressions . private 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;
}
* #m() {}

View File

@ -0,0 +1,20 @@
// Copyright (C) 20178 Bloomberg LP. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Syntax error if you call delete on call expressions . private 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;
}
#m() {}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Syntax error if you call delete on member expressions . privatename
template: delete-error
features: [class-methods-private]
---*/
//- expression
this.#m
//- functiondeclaration
async *#m() {}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Syntax error if you call delete on member expressions . privatename
template: delete-error
features: [class-methods-private]
---*/
//- expression
this.#m
//- functiondeclaration
async #m() {}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Syntax error if you call delete on member expressions . privatename
template: delete-error
features: [class-methods-private]
---*/
//- expression
this.#m
//- functiondeclaration
*#m() {}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Syntax error if you call delete on member expressions . privatename
template: delete-error
features: [class-methods-private]
---*/
//- expression
this.#m
//- functiondeclaration
#m() {}