diff --git a/src/class-elements/grammar-static-async-gen-meth-prototype.case b/src/class-elements/grammar-static-async-gen-meth-prototype.case new file mode 100644 index 0000000000..e65681d891 --- /dev/null +++ b/src/class-elements/grammar-static-async-gen-meth-prototype.case @@ -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: Static Async Generator Methods cannot be named prototype +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElement : static MethodDefinition + It is a Syntax Error if PropName of MethodDefinition is "prototype" +template: syntax/invalid +features: [async-iteration] +---*/ + +//- elements +static async * prototype() {} diff --git a/src/class-elements/grammar-static-async-meth-prototype.case b/src/class-elements/grammar-static-async-meth-prototype.case new file mode 100644 index 0000000000..0fefb32aee --- /dev/null +++ b/src/class-elements/grammar-static-async-meth-prototype.case @@ -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: Static Async Methods cannot be named prototype +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElement : static MethodDefinition + It is a Syntax Error if PropName of MethodDefinition is "prototype" +template: syntax/invalid +features: [async-functions] +---*/ + +//- elements +static async prototype() {} diff --git a/src/class-elements/grammar-static-gen-meth-prototype.case b/src/class-elements/grammar-static-gen-meth-prototype.case new file mode 100644 index 0000000000..4507e982f0 --- /dev/null +++ b/src/class-elements/grammar-static-gen-meth-prototype.case @@ -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: Static Generator Methods cannot be named prototype +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElement : static MethodDefinition + It is a Syntax Error if PropName of MethodDefinition is "prototype" +template: syntax/invalid +features: [generators] +---*/ + +//- elements +static * prototype() {} diff --git a/src/class-elements/grammar-static-get-meth-prototype.case b/src/class-elements/grammar-static-get-meth-prototype.case new file mode 100644 index 0000000000..37c3675e92 --- /dev/null +++ b/src/class-elements/grammar-static-get-meth-prototype.case @@ -0,0 +1,15 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: Static Accessor get Methods cannot be named prototype +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElement : static MethodDefinition + It is a Syntax Error if PropName of MethodDefinition is "prototype" +template: syntax/invalid +---*/ + +//- elements +static get prototype() {} diff --git a/src/class-elements/grammar-static-meth-prototype.case b/src/class-elements/grammar-static-meth-prototype.case new file mode 100644 index 0000000000..c96628d33d --- /dev/null +++ b/src/class-elements/grammar-static-meth-prototype.case @@ -0,0 +1,15 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: Static Methods cannot be named prototype +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElement : static MethodDefinition + It is a Syntax Error if PropName of MethodDefinition is "prototype" +template: syntax/invalid +---*/ + +//- elements +static prototype() {} diff --git a/src/class-elements/grammar-static-private-async-gen-meth-prototype.case b/src/class-elements/grammar-static-private-async-gen-meth-prototype.case new file mode 100644 index 0000000000..a83f12e750 --- /dev/null +++ b/src/class-elements/grammar-static-private-async-gen-meth-prototype.case @@ -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: Static Async Generator Private Methods can be named prototype +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElement : static MethodDefinition + It is a Syntax Error if PropName of MethodDefinition is "prototype" +template: syntax/valid +features: [async-iteration, class-static-methods-private] +---*/ + +//- elements +static async * #prototype() {} diff --git a/src/class-elements/grammar-static-private-async-meth-prototype.case b/src/class-elements/grammar-static-private-async-meth-prototype.case new file mode 100644 index 0000000000..c329367ebc --- /dev/null +++ b/src/class-elements/grammar-static-private-async-meth-prototype.case @@ -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: Static Async Private Methods can be named prototype +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElement : static MethodDefinition + It is a Syntax Error if PropName of MethodDefinition is "prototype" +template: syntax/valid +features: [async-functions, class-static-methods-private] +---*/ + +//- elements +static async #prototype() {} diff --git a/src/class-elements/grammar-static-private-gen-meth-prototype.case b/src/class-elements/grammar-static-private-gen-meth-prototype.case new file mode 100644 index 0000000000..8742834e60 --- /dev/null +++ b/src/class-elements/grammar-static-private-gen-meth-prototype.case @@ -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: Static Generator Private Methods can be named prototype +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElement : static MethodDefinition + It is a Syntax Error if PropName of MethodDefinition is "prototype" +template: syntax/valid +features: [generators, class-static-methods-private] +---*/ + +//- elements +static * #prototype() {} diff --git a/src/class-elements/grammar-static-private-meth-prototype.case b/src/class-elements/grammar-static-private-meth-prototype.case new file mode 100644 index 0000000000..14305ddc0e --- /dev/null +++ b/src/class-elements/grammar-static-private-meth-prototype.case @@ -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: Static Private Methods can be named prototype +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElement : static MethodDefinition + It is a Syntax Error if PropName of MethodDefinition is "prototype" +template: syntax/valid +features: [class-static-methods-private] +---*/ + +//- elements +static #prototype() {} diff --git a/src/class-elements/grammar-static-set-meth-prototype.case b/src/class-elements/grammar-static-set-meth-prototype.case new file mode 100644 index 0000000000..6c814a1142 --- /dev/null +++ b/src/class-elements/grammar-static-set-meth-prototype.case @@ -0,0 +1,15 @@ +// Copyright (C) 2018 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: Static Accessor set Methods cannot be named prototype +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElement : static MethodDefinition + It is a Syntax Error if PropName of MethodDefinition is "prototype" +template: syntax/invalid +---*/ + +//- elements +static set prototype() {} diff --git a/test/language/statements/class/syntax/early-errors/class-body-static-method-get-propname-prototype.js b/test/language/statements/class/syntax/early-errors/class-body-static-method-get-propname-prototype.js deleted file mode 100644 index 7ae9195679..0000000000 --- a/test/language/statements/class/syntax/early-errors/class-body-static-method-get-propname-prototype.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (C) 2015 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -es6id: 14.5.1 -description: > - ClassElement : static MethodDefinition - - It is a Syntax Error if PropName of MethodDefinition is "prototype". - - (get) - -negative: - phase: parse - type: SyntaxError ----*/ - -throw "Test262: This statement should not be evaluated."; -class A { - static get prototype() {} -} - diff --git a/test/language/statements/class/syntax/early-errors/class-body-static-method-propname-prototype.js b/test/language/statements/class/syntax/early-errors/class-body-static-method-propname-prototype.js deleted file mode 100644 index 0908999cad..0000000000 --- a/test/language/statements/class/syntax/early-errors/class-body-static-method-propname-prototype.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2015 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -es6id: 14.5.1 -description: > - ClassElement : static MethodDefinition - - It is a Syntax Error if PropName of MethodDefinition is "prototype". - -negative: - phase: parse - type: SyntaxError ----*/ - -throw "Test262: This statement should not be evaluated."; -class A { - static prototype() {} -} - diff --git a/test/language/statements/class/syntax/early-errors/class-body-static-method-set-propname-prototype.js b/test/language/statements/class/syntax/early-errors/class-body-static-method-set-propname-prototype.js deleted file mode 100644 index ed94b3ecfe..0000000000 --- a/test/language/statements/class/syntax/early-errors/class-body-static-method-set-propname-prototype.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (C) 2015 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -es6id: 14.5.1 -description: > - ClassElement : static MethodDefinition - - It is a Syntax Error if PropName of MethodDefinition is "prototype". - - (set) - -negative: - phase: parse - type: SyntaxError ----*/ - -throw "Test262: This statement should not be evaluated."; -class A { - static set prototype() {} -} -