diff --git a/src/class-fields/class-private-field-whitespace-syntax-error.case b/src/class-fields/class-private-field-whitespace-syntax-error.case new file mode 100644 index 00000000000..37d37027003 --- /dev/null +++ b/src/class-fields/class-private-field-whitespace-syntax-error.case @@ -0,0 +1,10 @@ +// 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 whitespace after '#' sigil +template: syntax/invalid +features: [class-fields-private] +---*/ + +//- fields +# x = 1 diff --git a/src/class-methods/class-private-async-generator-method-static-whitespace-syntax-error.case b/src/class-methods/class-private-async-generator-method-static-whitespace-syntax-error.case new file mode 100644 index 00000000000..ea3e7374ed6 --- /dev/null +++ b/src/class-methods/class-private-async-generator-method-static-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// 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 whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +static async * # m() {} diff --git a/src/class-methods/class-private-async-generator-method-whitespace-syntax-error.case b/src/class-methods/class-private-async-generator-method-whitespace-syntax-error.case new file mode 100644 index 00000000000..8989cb811b7 --- /dev/null +++ b/src/class-methods/class-private-async-generator-method-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// 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 whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +async * # m() {} diff --git a/src/class-methods/class-private-async-method-static-whitespace-syntax-error.case b/src/class-methods/class-private-async-method-static-whitespace-syntax-error.case new file mode 100644 index 00000000000..12106904ea5 --- /dev/null +++ b/src/class-methods/class-private-async-method-static-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// 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 whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +static async # m() {} diff --git a/src/class-methods/class-private-async-method-whitespace-syntax-error.case b/src/class-methods/class-private-async-method-whitespace-syntax-error.case new file mode 100644 index 00000000000..a7a2c25958d --- /dev/null +++ b/src/class-methods/class-private-async-method-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// 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 whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +async # m() {} diff --git a/src/class-methods/class-private-generator-method-static-whitespace-syntax-error.case b/src/class-methods/class-private-generator-method-static-whitespace-syntax-error.case new file mode 100644 index 00000000000..37069b4fee1 --- /dev/null +++ b/src/class-methods/class-private-generator-method-static-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// 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 whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +static * # m() {} diff --git a/src/class-methods/class-private-generator-method-whitespace-syntax-error.case b/src/class-methods/class-private-generator-method-whitespace-syntax-error.case new file mode 100644 index 00000000000..3a972277312 --- /dev/null +++ b/src/class-methods/class-private-generator-method-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// 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 whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +* # m() {} diff --git a/src/class-methods/class-private-getter-static-whitespace-syntax-error.case b/src/class-methods/class-private-getter-static-whitespace-syntax-error.case new file mode 100644 index 00000000000..65525415b36 --- /dev/null +++ b/src/class-methods/class-private-getter-static-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// 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 whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +static set # m() {} diff --git a/src/class-methods/class-private-getter-whitespace-syntax-error.case b/src/class-methods/class-private-getter-whitespace-syntax-error.case new file mode 100644 index 00000000000..2c067f13723 --- /dev/null +++ b/src/class-methods/class-private-getter-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// 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 whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +get # m() {} diff --git a/src/class-methods/class-private-method-static-whitespace-syntax-error.case b/src/class-methods/class-private-method-static-whitespace-syntax-error.case new file mode 100644 index 00000000000..c29a56416b2 --- /dev/null +++ b/src/class-methods/class-private-method-static-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// 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 whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +static # m() {} diff --git a/src/class-methods/class-private-method-whitespace-syntax-error.case b/src/class-methods/class-private-method-whitespace-syntax-error.case new file mode 100644 index 00000000000..cd0feaeb5f4 --- /dev/null +++ b/src/class-methods/class-private-method-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// 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 whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +# m() {} diff --git a/src/class-methods/class-private-method-whitespace-usage-syntax-error.case b/src/class-methods/class-private-method-whitespace-usage-syntax-error.case new file mode 100644 index 00000000000..dd53217e3c7 --- /dev/null +++ b/src/class-methods/class-private-method-whitespace-usage-syntax-error.case @@ -0,0 +1,17 @@ +// 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 whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +m() { + this.# x = 1; +} diff --git a/src/class-methods/class-private-setter-static-whitespace-syntax-error.case b/src/class-methods/class-private-setter-static-whitespace-syntax-error.case new file mode 100644 index 00000000000..65525415b36 --- /dev/null +++ b/src/class-methods/class-private-setter-static-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// 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 whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +static set # m() {} diff --git a/src/class-methods/class-private-setter-whitespace-syntax-error.case b/src/class-methods/class-private-setter-whitespace-syntax-error.case new file mode 100644 index 00000000000..c9c7dca58b9 --- /dev/null +++ b/src/class-methods/class-private-setter-whitespace-syntax-error.case @@ -0,0 +1,15 @@ +// 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 whitespace after '#' sigil +template: syntax +features: [class-methods-private] +negative: + phase: parse + type: SyntaxError +---*/ +//- setup +throw "Test262: This statement should not be evaluated."; + + //- methods +set # m() {} diff --git a/src/class-methods/syntax/class-decl.template b/src/class-methods/syntax/class-decl.template new file mode 100644 index 00000000000..e7f31724371 --- /dev/null +++ b/src/class-methods/syntax/class-decl.template @@ -0,0 +1,13 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-ClassElement +name: class declaration +path: language/statements/class/syntax- +features: [class] +---*/ + +class C { + /*{ methods }*/ +} diff --git a/src/class-methods/syntax/class-expr.template b/src/class-methods/syntax/class-expr.template new file mode 100644 index 00000000000..2a8e54326b3 --- /dev/null +++ b/src/class-methods/syntax/class-expr.template @@ -0,0 +1,13 @@ +// Copyright (C) 2018 Bloomberg LP. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: prod-ClassElement +name: class expression +path: language/expressions/class/syntax-invalid- +features: [class] +---*/ + +var C = class { + /*{ methods }*/ +};