diff --git a/src/class-elements/grammar-privatename-constructor.case b/src/class-elements/grammar-privatename-constructor.case new file mode 100644 index 0000000000..aff1f6881d --- /dev/null +++ b/src/class-elements/grammar-privatename-constructor.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: Private Fields cannot be named constructor +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElementName : PrivateName ; + It is a Syntax Error if StringValue of PrivateName is "#constructor" +template: syntax/invalid +features: [class-fields-private] +---*/ + +//- elements +#constructor diff --git a/src/class-elements/grammar-static-private-async-gen-meth-constructor.case b/src/class-elements/grammar-static-private-async-gen-meth-constructor.case new file mode 100644 index 0000000000..95dd8e357c --- /dev/null +++ b/src/class-elements/grammar-static-private-async-gen-meth-constructor.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 cannot be named constructor +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElementName : PrivateName ; + It is a Syntax Error if StringValue of PrivateName is "#constructor" +template: syntax/invalid +features: [async-iteration, class-static-methods-private] +---*/ + +//- elements +static async * #constructor() {} diff --git a/src/class-elements/grammar-static-private-async-meth-constructor.case b/src/class-elements/grammar-static-private-async-meth-constructor.case new file mode 100644 index 0000000000..dbcfa23b2e --- /dev/null +++ b/src/class-elements/grammar-static-private-async-meth-constructor.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 cannot be named constructor +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElementName : PrivateName ; + It is a Syntax Error if StringValue of PrivateName is "#constructor" +template: syntax/invalid +features: [async-functions, class-static-methods-private] +---*/ + +//- elements +static async #constructor() {} diff --git a/src/class-elements/grammar-static-private-gen-meth-constructor.case b/src/class-elements/grammar-static-private-gen-meth-constructor.case new file mode 100644 index 0000000000..d2bb110ce9 --- /dev/null +++ b/src/class-elements/grammar-static-private-gen-meth-constructor.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 cannot be named constructor +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElementName : PrivateName ; + It is a Syntax Error if StringValue of PrivateName is "#constructor" +template: syntax/invalid +features: [generators, class-static-methods-private] +---*/ + +//- elements +static * #constructor() {} diff --git a/src/class-elements/grammar-static-private-meth-constructor.case b/src/class-elements/grammar-static-private-meth-constructor.case new file mode 100644 index 0000000000..17757ee24b --- /dev/null +++ b/src/class-elements/grammar-static-private-meth-constructor.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 cannot be named constructor +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElementName : PrivateName ; + It is a Syntax Error if StringValue of PrivateName is "#constructor" +template: syntax/invalid +features: [class-static-methods-private] +---*/ + +//- elements +static #constructor() {} diff --git a/src/class-elements/grammar-static-privatename-constructor.case b/src/class-elements/grammar-static-privatename-constructor.case new file mode 100644 index 0000000000..83f23e7014 --- /dev/null +++ b/src/class-elements/grammar-static-privatename-constructor.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 Fields cannot be named constructor +info: | + Class Definitions / Static Semantics: Early Errors + + ClassElementName : PrivateName ; + It is a Syntax Error if StringValue of PrivateName is "#constructor" +template: syntax/invalid +features: [class-static-fields-private] +---*/ + +//- elements +static #constructor