private fields/methods whitespace syntax error (#1343)

This commit is contained in:
jbhoosreddy 2018-09-04 22:28:09 -04:00 committed by Leo Balter
parent 6aa46d0ddb
commit 19df5b04b2
16 changed files with 233 additions and 0 deletions

View File

@ -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

View File

@ -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() {}

View File

@ -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() {}

View File

@ -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() {}

View File

@ -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() {}

View File

@ -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() {}

View File

@ -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() {}

View File

@ -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() {}

View File

@ -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() {}

View File

@ -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() {}

View File

@ -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() {}

View File

@ -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;
}

View File

@ -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() {}

View File

@ -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() {}

View File

@ -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 }*/
}

View File

@ -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-
features: [class]
---*/
var C = class {
/*{ methods }*/
};