forked from tc39/test262
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
private fields/methods whitespace syntax error (tc39#1343)
- Loading branch information
1 parent
ef77548
commit 6cc6bf9
Showing
16 changed files
with
233 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
src/class-fields/class-private-field-whitespace-syntax-error.case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
15 changes: 15 additions & 0 deletions
15
src/class-methods/class-private-async-generator-method-static-whitespace-syntax-error.case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
15 changes: 15 additions & 0 deletions
15
src/class-methods/class-private-async-generator-method-whitespace-syntax-error.case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
15 changes: 15 additions & 0 deletions
15
src/class-methods/class-private-async-method-static-whitespace-syntax-error.case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
15 changes: 15 additions & 0 deletions
15
src/class-methods/class-private-async-method-whitespace-syntax-error.case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
15 changes: 15 additions & 0 deletions
15
src/class-methods/class-private-generator-method-static-whitespace-syntax-error.case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
15 changes: 15 additions & 0 deletions
15
src/class-methods/class-private-generator-method-whitespace-syntax-error.case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
15 changes: 15 additions & 0 deletions
15
src/class-methods/class-private-getter-static-whitespace-syntax-error.case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
15 changes: 15 additions & 0 deletions
15
src/class-methods/class-private-getter-whitespace-syntax-error.case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
15 changes: 15 additions & 0 deletions
15
src/class-methods/class-private-method-static-whitespace-syntax-error.case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
15 changes: 15 additions & 0 deletions
15
src/class-methods/class-private-method-whitespace-syntax-error.case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
17 changes: 17 additions & 0 deletions
17
src/class-methods/class-private-method-whitespace-usage-syntax-error.case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
15 changes: 15 additions & 0 deletions
15
src/class-methods/class-private-setter-static-whitespace-syntax-error.case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
15 changes: 15 additions & 0 deletions
15
src/class-methods/class-private-setter-whitespace-syntax-error.case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }*/ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }*/ | ||
}; |