From 227a85b9d391842d785b7bec3f1d390228438a73 Mon Sep 17 00:00:00 2001 From: jbhoosreddy Date: Tue, 11 Sep 2018 14:46:22 -0400 Subject: [PATCH] test: Early error private methods delete (#1343) --- ...l-expression-private-method-async-gen.case | 20 +++++++++++++++++++ ...-call-expression-private-method-async.case | 20 +++++++++++++++++++ ...te-call-expression-private-method-gen.case | 20 +++++++++++++++++++ ...delete-call-expression-private-method.case | 20 +++++++++++++++++++ ...r-delete-call-expression-privatename.case} | 0 ...r-expression-private-method-async-gen.case | 14 +++++++++++++ ...ember-expression-private-method-async.case | 14 +++++++++++++ ...-member-expression-private-method-gen.case | 14 +++++++++++++ ...lete-member-expression-private-method.case | 14 +++++++++++++ ...delete-member-expression-privatename.case} | 0 10 files changed, 136 insertions(+) create mode 100644 src/class-elements/err-delete-call-expression-private-method-async-gen.case create mode 100644 src/class-elements/err-delete-call-expression-private-method-async.case create mode 100644 src/class-elements/err-delete-call-expression-private-method-gen.case create mode 100644 src/class-elements/err-delete-call-expression-private-method.case rename src/class-elements/{call-expression-privatename.case => err-delete-call-expression-privatename.case} (100%) create mode 100644 src/class-elements/err-delete-member-expression-private-method-async-gen.case create mode 100644 src/class-elements/err-delete-member-expression-private-method-async.case create mode 100644 src/class-elements/err-delete-member-expression-private-method-gen.case create mode 100644 src/class-elements/err-delete-member-expression-private-method.case rename src/class-elements/{member-expression-privatename.case => err-delete-member-expression-privatename.case} (100%) diff --git a/src/class-elements/err-delete-call-expression-private-method-async-gen.case b/src/class-elements/err-delete-call-expression-private-method-async-gen.case new file mode 100644 index 0000000000..86134ce8b7 --- /dev/null +++ b/src/class-elements/err-delete-call-expression-private-method-async-gen.case @@ -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() {} diff --git a/src/class-elements/err-delete-call-expression-private-method-async.case b/src/class-elements/err-delete-call-expression-private-method-async.case new file mode 100644 index 0000000000..e6768dcc27 --- /dev/null +++ b/src/class-elements/err-delete-call-expression-private-method-async.case @@ -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() {} diff --git a/src/class-elements/err-delete-call-expression-private-method-gen.case b/src/class-elements/err-delete-call-expression-private-method-gen.case new file mode 100644 index 0000000000..419001c2ea --- /dev/null +++ b/src/class-elements/err-delete-call-expression-private-method-gen.case @@ -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() {} diff --git a/src/class-elements/err-delete-call-expression-private-method.case b/src/class-elements/err-delete-call-expression-private-method.case new file mode 100644 index 0000000000..bcd6f5a683 --- /dev/null +++ b/src/class-elements/err-delete-call-expression-private-method.case @@ -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() {} diff --git a/src/class-elements/call-expression-privatename.case b/src/class-elements/err-delete-call-expression-privatename.case similarity index 100% rename from src/class-elements/call-expression-privatename.case rename to src/class-elements/err-delete-call-expression-privatename.case diff --git a/src/class-elements/err-delete-member-expression-private-method-async-gen.case b/src/class-elements/err-delete-member-expression-private-method-async-gen.case new file mode 100644 index 0000000000..7ac3924b26 --- /dev/null +++ b/src/class-elements/err-delete-member-expression-private-method-async-gen.case @@ -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() {} diff --git a/src/class-elements/err-delete-member-expression-private-method-async.case b/src/class-elements/err-delete-member-expression-private-method-async.case new file mode 100644 index 0000000000..379c9c5651 --- /dev/null +++ b/src/class-elements/err-delete-member-expression-private-method-async.case @@ -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() {} diff --git a/src/class-elements/err-delete-member-expression-private-method-gen.case b/src/class-elements/err-delete-member-expression-private-method-gen.case new file mode 100644 index 0000000000..1ba893ab2f --- /dev/null +++ b/src/class-elements/err-delete-member-expression-private-method-gen.case @@ -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() {} diff --git a/src/class-elements/err-delete-member-expression-private-method.case b/src/class-elements/err-delete-member-expression-private-method.case new file mode 100644 index 0000000000..7f158a8b30 --- /dev/null +++ b/src/class-elements/err-delete-member-expression-private-method.case @@ -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() {} diff --git a/src/class-elements/member-expression-privatename.case b/src/class-elements/err-delete-member-expression-privatename.case similarity index 100% rename from src/class-elements/member-expression-privatename.case rename to src/class-elements/err-delete-member-expression-privatename.case