mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
Class Fields: features corrections
This commit is contained in:
parent
ad446cae7d
commit
192c8fd4f6
@ -13,7 +13,7 @@ info: |
|
||||
It is a Syntax Error if the UnaryExpression is contained in strict mode code and the derived UnaryExpression is PrimaryExpression : IdentifierReference , MemberExpression : MemberExpression.PrivateName , or CallExpression : CallExpression.PrivateName .
|
||||
|
||||
It is a Syntax Error if the derived UnaryExpression is PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and CoverParenthesizedExpressionAndArrowParameterList ultimately derives a phrase that, if used in place of UnaryExpression, would produce a Syntax Error according to these rules. This rule is recursively applied.
|
||||
features: [class, class-fields-private]
|
||||
features: [class, class-fields-private, class-fields-public]
|
||||
negative:
|
||||
type: SyntaxError
|
||||
phase: parse
|
||||
|
@ -5,7 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/statements/class/fields-arrow-fnc-
|
||||
name: arrow function expression
|
||||
features: [arrow-function]
|
||||
features: [arrow-function, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,11 +5,12 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/statements/class/fields-comp-name-
|
||||
name: computed ClassElementName
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
var x = "string";
|
||||
class C {
|
||||
static [x] = /*{ initializer }*/;
|
||||
[x] = /*{ initializer }*/;
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/statements/class/fields-equality-
|
||||
name: equality expression
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/statements/class/fields-literal-name-
|
||||
name: literal ClassElementName
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/statements/class/fields-static-comp-name-
|
||||
name: static computed ClassElementName
|
||||
features: [class, class-static-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/statements/class/fields-static-literal-
|
||||
name: static literal ClassElementName
|
||||
features: [class, class-static-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/statements/class/fields-static-private-
|
||||
name: static PrivateName
|
||||
features: [class, class-static-fields-private]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/statements/class/fields-static-string-literal-name-
|
||||
name: static string literal ClassElementName
|
||||
features: [class, class-static-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/statements/class/fields-string-literal-name-
|
||||
name: string literal ClassElementName
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/statements/class/fields-ternary-
|
||||
name: ternary expression
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/statements/class/fields-typeof-
|
||||
name: typeof expression
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,7 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/expressions/class/fields-arrow-fnc-
|
||||
name: arrow function expression
|
||||
features: [arrow-function]
|
||||
features: [arrow-function, class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/expressions/class/fields-comp-name-
|
||||
name: computed ClassElementName
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/expressions/class/fields-equality-
|
||||
name: equality expression
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/expressions/class/fields-literal-name-
|
||||
name: literal ClassElementName
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/expressions/class/fields-static-comp-name-
|
||||
name: static computed ClassElementName
|
||||
features: [class, class-static-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/expressions/class/fields-static-literal-
|
||||
name: static literal ClassElementName
|
||||
features: [class, class-static-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/expressions/class/fields-static-private-
|
||||
name: static PrivateName
|
||||
features: [class, class-static-fields-private]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/expressions/class/fields-static-string-literal-name-
|
||||
name: static string literal ClassElementName
|
||||
features: [class, class-static-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/expressions/class/fields-string-literal-name-
|
||||
name: string literal ClassElementName
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/expressions/class/fields-ternary-
|
||||
name: ternary expression
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-class-definitions-static-semantics-early-errors
|
||||
path: language/expressions/class/fields-typeof-
|
||||
name: typeof expression
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/statements/class/fields-direct-
|
||||
name: direct eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
var executed = false;
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/statements/class/fields-indirect-
|
||||
name: indirect eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
var executed = false;
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/expressions/class/fields-direct-
|
||||
name: direct eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
var executed = false;
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/expressions/class/fields-indirect-
|
||||
name: indirect eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
var executed = false;
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/statements/class/fields-direct-
|
||||
name: direct eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
var executed = false;
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/statements/class/fields-indirect-
|
||||
name: indirect eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
var executed = false;
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/expressions/class/fields-direct-
|
||||
name: direct eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
var executed = false;
|
||||
|
@ -5,6 +5,7 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/expressions/class/fields-indirect-
|
||||
name: indirect eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
var executed = false;
|
||||
|
@ -7,9 +7,8 @@ path: language/statements/class/fields-derived-cls-direct-
|
||||
name: direct eval
|
||||
---*/
|
||||
|
||||
class A {}
|
||||
|
||||
var executed = false;
|
||||
class A {}
|
||||
class C extends A {
|
||||
x = eval('executed = true; /*{ initializer }*/;');
|
||||
}
|
||||
|
@ -7,9 +7,8 @@ path: language/statements/class/fields-derived-cls-indirect-
|
||||
name: indirect eval
|
||||
---*/
|
||||
|
||||
class A {}
|
||||
|
||||
var executed = false;
|
||||
class A {}
|
||||
class C extends A {
|
||||
x = (0, eval)('executed = true; /*{ initializer }*/;');
|
||||
}
|
||||
|
@ -7,9 +7,8 @@ path: language/expressions/class/fields-derived-cls-direct-
|
||||
name: direct eval
|
||||
---*/
|
||||
|
||||
var A = class {}
|
||||
|
||||
var executed = false;
|
||||
var A = class {}
|
||||
var C = class extends A {
|
||||
x = eval('executed = true; /*{ initializer }*/;');
|
||||
}
|
||||
|
@ -7,9 +7,8 @@ path: language/expressions/class/fields-derived-cls-indirect-
|
||||
name: indirect eval
|
||||
---*/
|
||||
|
||||
var A = class {}
|
||||
|
||||
var executed = false;
|
||||
var A = class {}
|
||||
var C = class extends A {
|
||||
x = (0, eval)('executed = true; /*{ initializer }*/;');
|
||||
}
|
||||
|
@ -7,9 +7,8 @@ path: language/statements/class/fields-derived-cls-direct-
|
||||
name: direct eval
|
||||
---*/
|
||||
|
||||
class A {}
|
||||
|
||||
var executed = false;
|
||||
class A {}
|
||||
class C extends A {
|
||||
x = eval('executed = true; /*{ initializer }*/;');
|
||||
}
|
||||
|
@ -7,9 +7,8 @@ path: language/statements/class/fields-derived-cls-indirect-
|
||||
name: indirect eval
|
||||
---*/
|
||||
|
||||
class A {}
|
||||
|
||||
var executed = false;
|
||||
class A {}
|
||||
class C extends A {
|
||||
x = (0, eval)('executed = true; /*{ initializer }*/;');
|
||||
}
|
||||
|
@ -7,12 +7,11 @@ path: language/expressions/class/fields-derived-cls-direct-
|
||||
name: direct eval
|
||||
---*/
|
||||
|
||||
var A = class {}
|
||||
|
||||
var executed = false;
|
||||
var A = class {}
|
||||
var C = class extends A {
|
||||
x = eval('executed = true; /*{ initializer }*/;');
|
||||
}
|
||||
};
|
||||
|
||||
new C();
|
||||
|
||||
|
@ -7,12 +7,11 @@ path: language/expressions/class/fields-derived-cls-indirect-
|
||||
name: indirect eval
|
||||
---*/
|
||||
|
||||
var A = class {}
|
||||
|
||||
var executed = false;
|
||||
var A = class {}
|
||||
var C = class extends A {
|
||||
x = (0, eval)('executed = true; /*{ initializer }*/;');
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(SyntaxError, function() {
|
||||
new C();
|
||||
|
@ -5,12 +5,12 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/statements/class/fields-derived-cls-direct-
|
||||
name: direct eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
class A = {}
|
||||
|
||||
var executed = false;
|
||||
class C extends A = {
|
||||
class A = {}
|
||||
class C extends A {
|
||||
x = eval('executed = true; /*{ initializer }*/;';
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,13 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/statements/class/fields-derived-cls-indirect-
|
||||
name: indirect eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
class A = {}
|
||||
|
||||
var executed = false;
|
||||
class C extends A = {
|
||||
class C extends A {
|
||||
x = (0, eval)('executed = true; /*{ initializer }*/;';
|
||||
}
|
||||
|
||||
|
@ -5,14 +5,14 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/expressions/class/fields-derived-cls-direct-
|
||||
name: direct eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
A = class {}
|
||||
|
||||
var executed = false;
|
||||
C = class extends A {
|
||||
var A = class {}
|
||||
var C = class extends A {
|
||||
x = eval('executed = true; /*{ initializer }*/;';
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(/*{ earlyerror }*/, function() {
|
||||
new C();
|
||||
|
@ -5,14 +5,14 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/expressions/class/fields-derived-cls-indirect-
|
||||
name: indirect eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
A = class {}
|
||||
|
||||
var executed = false;
|
||||
C = class extends A {
|
||||
var A = class {}
|
||||
var C = class extends A {
|
||||
x = (0, eval)('executed = true; /*{ initializer }*/;';
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(/*{ executionerror }*/, function() {
|
||||
new C();
|
||||
|
@ -5,10 +5,11 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/statements/class/fields-direct-
|
||||
name: direct eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
var executed = false;
|
||||
class C = {
|
||||
class C {
|
||||
x = eval('executed = true; /*{ initializer }*/;');
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,11 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/statements/class/fields-indirect-
|
||||
name: indirect eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
var executed = false;
|
||||
class C = {
|
||||
class C {
|
||||
x = (0, eval)('executed = true; /*{ initializer }*/;');
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,11 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/expressions/class/fields-direct-
|
||||
name: direct eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
var executed = false;
|
||||
C = class {
|
||||
var C = class {
|
||||
x = eval('executed = true; /*{ initializer }*/;');
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,13 @@
|
||||
esid: sec-performeval-rules-in-initializer
|
||||
path: language/expressions/class/fields-indirect-
|
||||
name: indirect eval
|
||||
features: [class, class-fields-public]
|
||||
---*/
|
||||
|
||||
var executed = false;
|
||||
C = class {
|
||||
var C = class {
|
||||
x = (0, eval)('executed = true; /*{ initializer }*/;');
|
||||
}
|
||||
};
|
||||
|
||||
assert.throws(/*{ executionerror }*/, function() {
|
||||
new C();
|
||||
|
Loading…
x
Reference in New Issue
Block a user