mirror of
https://github.com/tc39/test262.git
synced 2025-07-26 07:25:15 +02:00
private fields/methods whitespace syntax error (#1343)
This commit is contained in:
parent
6aa46d0ddb
commit
19df5b04b2
@ -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
|
@ -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() {}
|
@ -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() {}
|
@ -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() {}
|
@ -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() {}
|
@ -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() {}
|
@ -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() {}
|
@ -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() {}
|
@ -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() {}
|
@ -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() {}
|
@ -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() {}
|
@ -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;
|
||||||
|
}
|
@ -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() {}
|
@ -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() {}
|
13
src/class-methods/syntax/class-decl.template
Normal file
13
src/class-methods/syntax/class-decl.template
Normal 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 }*/
|
||||||
|
}
|
13
src/class-methods/syntax/class-expr.template
Normal file
13
src/class-methods/syntax/class-expr.template
Normal 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 }*/
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user