-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
614 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
...language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js
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,26 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/class-elements/grammar-privatemeth-duplicate-get-field.case | ||
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template | ||
/*--- | ||
description: It's a SyntaxError if a class contains a private getter and a private field with the same name (class expression) | ||
esid: prod-ClassElement | ||
features: [class-methods-private, class-fields-private, class] | ||
flags: [generated] | ||
negative: | ||
phase: parse | ||
type: SyntaxError | ||
info: | | ||
Static Semantics: Early Errors | ||
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
---*/ | ||
|
||
|
||
throw "Test262: This statement should not be evaluated."; | ||
|
||
var C = class { | ||
#m; | ||
get #m() {} | ||
}; |
26 changes: 26 additions & 0 deletions
26
test/language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js
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,26 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/class-elements/grammar-privatemeth-duplicate-get-get.case | ||
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template | ||
/*--- | ||
description: It's a SyntaxError if a class contains multiple private getters with the same name (class expression) | ||
esid: prod-ClassElement | ||
features: [class-methods-private, class] | ||
flags: [generated] | ||
negative: | ||
phase: parse | ||
type: SyntaxError | ||
info: | | ||
Static Semantics: Early Errors | ||
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
---*/ | ||
|
||
|
||
throw "Test262: This statement should not be evaluated."; | ||
|
||
var C = class { | ||
get #m() {} | ||
get #m() {} | ||
}; |
26 changes: 26 additions & 0 deletions
26
...anguage/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js
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,26 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/class-elements/grammar-privatemeth-duplicate-meth-field.case | ||
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template | ||
/*--- | ||
description: It's a SyntaxError if a class contains a private method and a private field with the same name (class expression) | ||
esid: prod-ClassElement | ||
features: [class-methods-private, class-fields-private, class] | ||
flags: [generated] | ||
negative: | ||
phase: parse | ||
type: SyntaxError | ||
info: | | ||
Static Semantics: Early Errors | ||
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
---*/ | ||
|
||
|
||
throw "Test262: This statement should not be evaluated."; | ||
|
||
var C = class { | ||
#m; | ||
#m() {} | ||
}; |
26 changes: 26 additions & 0 deletions
26
.../language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js
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,26 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/class-elements/grammar-privatemeth-duplicate-meth-get.case | ||
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template | ||
/*--- | ||
description: It's a SyntaxError if a class contains a private method and a private getter with the same name (class expression) | ||
esid: prod-ClassElement | ||
features: [class-methods-private, class] | ||
flags: [generated] | ||
negative: | ||
phase: parse | ||
type: SyntaxError | ||
info: | | ||
Static Semantics: Early Errors | ||
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
---*/ | ||
|
||
|
||
throw "Test262: This statement should not be evaluated."; | ||
|
||
var C = class { | ||
get #m() {} | ||
#m() {} | ||
}; |
26 changes: 26 additions & 0 deletions
26
...language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js
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,26 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/class-elements/grammar-privatemeth-duplicate-meth-meth.case | ||
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template | ||
/*--- | ||
description: It's a SyntaxError if a class contains multiple private methods with the same name (class expression) | ||
esid: prod-ClassElement | ||
features: [class-methods-private, class] | ||
flags: [generated] | ||
negative: | ||
phase: parse | ||
type: SyntaxError | ||
info: | | ||
Static Semantics: Early Errors | ||
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
---*/ | ||
|
||
|
||
throw "Test262: This statement should not be evaluated."; | ||
|
||
var C = class { | ||
#m() {} | ||
#m() {} | ||
}; |
26 changes: 26 additions & 0 deletions
26
.../language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js
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,26 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/class-elements/grammar-privatemeth-duplicate-meth-set.case | ||
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template | ||
/*--- | ||
description: It's a SyntaxError if a class contains a private method and a private setter with the same name (class expression) | ||
esid: prod-ClassElement | ||
features: [class-methods-private, class] | ||
flags: [generated] | ||
negative: | ||
phase: parse | ||
type: SyntaxError | ||
info: | | ||
Static Semantics: Early Errors | ||
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
---*/ | ||
|
||
|
||
throw "Test262: This statement should not be evaluated."; | ||
|
||
var C = class { | ||
set #m(_) {} | ||
#m() {} | ||
}; |
26 changes: 26 additions & 0 deletions
26
...e/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js
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,26 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/class-elements/grammar-privatemeth-duplicate-meth-staticfield.case | ||
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template | ||
/*--- | ||
description: It's a SyntaxError if a class contains a private method and a private static field with the same name (class expression) | ||
esid: prod-ClassElement | ||
features: [class-methods-private, class-static-fields-private, class] | ||
flags: [generated] | ||
negative: | ||
phase: parse | ||
type: SyntaxError | ||
info: | | ||
Static Semantics: Early Errors | ||
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
---*/ | ||
|
||
|
||
throw "Test262: This statement should not be evaluated."; | ||
|
||
var C = class { | ||
static #m; | ||
#m() {} | ||
}; |
26 changes: 26 additions & 0 deletions
26
...ge/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js
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,26 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/class-elements/grammar-privatemeth-duplicate-meth-staticmeth.case | ||
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template | ||
/*--- | ||
description: It's a SyntaxError if a class contains a private method and a private static method with the same name (class expression) | ||
esid: prod-ClassElement | ||
features: [class-methods-private, class-static-methods-private, class] | ||
flags: [generated] | ||
negative: | ||
phase: parse | ||
type: SyntaxError | ||
info: | | ||
Static Semantics: Early Errors | ||
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
---*/ | ||
|
||
|
||
throw "Test262: This statement should not be evaluated."; | ||
|
||
var C = class { | ||
static #m() {} | ||
#m() {} | ||
}; |
26 changes: 26 additions & 0 deletions
26
...language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js
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,26 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/class-elements/grammar-privatemeth-duplicate-set-field.case | ||
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template | ||
/*--- | ||
description: It's a SyntaxError if a class contains a private setter and a private field with the same name (class expression) | ||
esid: prod-ClassElement | ||
features: [class-methods-private, class-fields-private, class] | ||
flags: [generated] | ||
negative: | ||
phase: parse | ||
type: SyntaxError | ||
info: | | ||
Static Semantics: Early Errors | ||
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
---*/ | ||
|
||
|
||
throw "Test262: This statement should not be evaluated."; | ||
|
||
var C = class { | ||
#m; | ||
set #m(_) {} | ||
}; |
26 changes: 26 additions & 0 deletions
26
test/language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js
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,26 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/class-elements/grammar-privatemeth-duplicate-set-set.case | ||
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template | ||
/*--- | ||
description: It's a SyntaxError if a class contains multiple private setters with the same name (class expression) | ||
esid: prod-ClassElement | ||
features: [class-methods-private, class] | ||
flags: [generated] | ||
negative: | ||
phase: parse | ||
type: SyntaxError | ||
info: | | ||
Static Semantics: Early Errors | ||
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
---*/ | ||
|
||
|
||
throw "Test262: This statement should not be evaluated."; | ||
|
||
var C = class { | ||
set #m(_) {} | ||
set #m(_) {} | ||
}; |
21 changes: 21 additions & 0 deletions
21
test/language/expressions/class/syntax/valid/grammar-privatemeth-duplicate-get-set.js
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,21 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/class-elements/grammar-privatemeth-duplicate-get-set.case | ||
// - src/class-elements/syntax/valid/cls-expr-elements-valid-syntax.template | ||
/*--- | ||
description: It's valid if a class contains a private getter and a private setter with the same name (class expression) | ||
esid: prod-ClassElement | ||
features: [class-methods-private, class] | ||
flags: [generated] | ||
info: | | ||
Static Semantics: Early Errors | ||
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
---*/ | ||
|
||
|
||
var C = class { | ||
get #m() {} | ||
set #m(_) {} | ||
}; |
26 changes: 26 additions & 0 deletions
26
...uage/expressions/class/syntax/valid/grammar-privatemeth-duplicate-meth-nestedclassmeth.js
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,26 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/class-elements/grammar-privatemeth-duplicate-meth-nestedclassmeth.case | ||
// - src/class-elements/syntax/valid/cls-expr-elements-valid-syntax.template | ||
/*--- | ||
description: It's valid if a nested class shadows a private method (class expression) | ||
esid: prod-ClassElement | ||
features: [class-methods-private, class] | ||
flags: [generated] | ||
info: | | ||
Static Semantics: Early Errors | ||
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
---*/ | ||
|
||
|
||
var C = class { | ||
constructor() { | ||
class B { | ||
#m() {} | ||
} | ||
} | ||
|
||
#m() {} | ||
}; |
26 changes: 26 additions & 0 deletions
26
.../language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js
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,26 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/class-elements/grammar-privatemeth-duplicate-get-field.case | ||
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template | ||
/*--- | ||
description: It's a SyntaxError if a class contains a private getter and a private field with the same name (class declaration) | ||
esid: prod-ClassElement | ||
features: [class-methods-private, class-fields-private, class] | ||
flags: [generated] | ||
negative: | ||
phase: parse | ||
type: SyntaxError | ||
info: | | ||
Static Semantics: Early Errors | ||
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
---*/ | ||
|
||
|
||
throw "Test262: This statement should not be evaluated."; | ||
|
||
class C { | ||
#m; | ||
get #m() {} | ||
} |
26 changes: 26 additions & 0 deletions
26
test/language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js
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,26 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/class-elements/grammar-privatemeth-duplicate-get-get.case | ||
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template | ||
/*--- | ||
description: It's a SyntaxError if a class contains multiple private getters with the same name (class declaration) | ||
esid: prod-ClassElement | ||
features: [class-methods-private, class] | ||
flags: [generated] | ||
negative: | ||
phase: parse | ||
type: SyntaxError | ||
info: | | ||
Static Semantics: Early Errors | ||
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
---*/ | ||
|
||
|
||
throw "Test262: This statement should not be evaluated."; | ||
|
||
class C { | ||
get #m() {} | ||
get #m() {} | ||
} |
26 changes: 26 additions & 0 deletions
26
...language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js
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,26 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/class-elements/grammar-privatemeth-duplicate-meth-field.case | ||
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template | ||
/*--- | ||
description: It's a SyntaxError if a class contains a private method and a private field with the same name (class declaration) | ||
esid: prod-ClassElement | ||
features: [class-methods-private, class-fields-private, class] | ||
flags: [generated] | ||
negative: | ||
phase: parse | ||
type: SyntaxError | ||
info: | | ||
Static Semantics: Early Errors | ||
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
---*/ | ||
|
||
|
||
throw "Test262: This statement should not be evaluated."; | ||
|
||
class C { | ||
#m; | ||
#m() {} | ||
} |
Oops, something went wrong.