mirror of
https://github.com/tc39/test262.git
synced 2025-07-27 07:54:41 +02:00
Generate tests
This commit is contained in:
parent
6b808920dd
commit
395adc3a7c
@ -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() {}
|
||||||
|
};
|
@ -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() {}
|
||||||
|
};
|
@ -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() {}
|
||||||
|
};
|
@ -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() {}
|
||||||
|
};
|
@ -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() {}
|
||||||
|
};
|
@ -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() {}
|
||||||
|
};
|
@ -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() {}
|
||||||
|
};
|
@ -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() {}
|
||||||
|
};
|
@ -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(_) {}
|
||||||
|
};
|
@ -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(_) {}
|
||||||
|
};
|
@ -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(_) {}
|
||||||
|
};
|
@ -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() {}
|
||||||
|
};
|
@ -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() {}
|
||||||
|
}
|
@ -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() {}
|
||||||
|
}
|
@ -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() {}
|
||||||
|
}
|
@ -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-decl-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 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() {}
|
||||||
|
#m() {}
|
||||||
|
}
|
@ -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-decl-elements-invalid-syntax.template
|
||||||
|
/*---
|
||||||
|
description: It's a SyntaxError if a class contains multiple private methods 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 {
|
||||||
|
#m() {}
|
||||||
|
#m() {}
|
||||||
|
}
|
@ -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-decl-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 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 {
|
||||||
|
set #m(_) {}
|
||||||
|
#m() {}
|
||||||
|
}
|
@ -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-decl-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 declaration)
|
||||||
|
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.";
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static #m;
|
||||||
|
#m() {}
|
||||||
|
}
|
@ -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-decl-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 declaration)
|
||||||
|
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.";
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static #m() {}
|
||||||
|
#m() {}
|
||||||
|
}
|
@ -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-decl-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 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;
|
||||||
|
set #m(_) {}
|
||||||
|
}
|
@ -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-decl-elements-invalid-syntax.template
|
||||||
|
/*---
|
||||||
|
description: It's a SyntaxError if a class contains multiple private setters 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 {
|
||||||
|
set #m(_) {}
|
||||||
|
set #m(_) {}
|
||||||
|
}
|
@ -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-decl-elements-valid-syntax.template
|
||||||
|
/*---
|
||||||
|
description: It's valid if a class contains a private getter and a private setter with the same name (class declaration)
|
||||||
|
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.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #m() {}
|
||||||
|
set #m(_) {}
|
||||||
|
}
|
@ -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-decl-elements-valid-syntax.template
|
||||||
|
/*---
|
||||||
|
description: It's valid if a nested class shadows a private method (class declaration)
|
||||||
|
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.
|
||||||
|
|
||||||
|
---*/
|
||||||
|
|
||||||
|
|
||||||
|
class C {
|
||||||
|
constructor() {
|
||||||
|
class B {
|
||||||
|
#m() {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#m() {}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user