mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 16:34:27 +02:00
Re-generate tests
This commit is contained in:
parent
228851fbe4
commit
37d5f8e5ef
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed-err-evaluation.case
|
||||||
|
// - src/accessor-names/error/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion when evaluating expression (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
---*/
|
||||||
|
var thrower = function() {
|
||||||
|
throw new Test262Error();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.throws(Test262Error, function() {
|
||||||
|
0, class {
|
||||||
|
get [thrower()]() {}
|
||||||
|
};
|
||||||
|
}, '`get` accessor');
|
||||||
|
|
||||||
|
assert.throws(Test262Error, function() {
|
||||||
|
0, class {
|
||||||
|
set [thrower()](_) {}
|
||||||
|
};
|
||||||
|
}, '`set` accessor');
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed-err-to-prop-key.case
|
||||||
|
// - src/accessor-names/error/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion when coercing to property key value (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
|
||||||
|
7.1.14 ToPropertyKey
|
||||||
|
|
||||||
|
1. Let key be ? ToPrimitive(argument, hint String).
|
||||||
|
|
||||||
|
7.1.1 ToPrimitive
|
||||||
|
|
||||||
|
[...]
|
||||||
|
7. Return ? OrdinaryToPrimitive(input, hint).
|
||||||
|
|
||||||
|
7.1.1.1 OrdinaryToPrimitive
|
||||||
|
|
||||||
|
5. For each name in methodNames in List order, do
|
||||||
|
[...]
|
||||||
|
6. Throw a TypeError exception.
|
||||||
|
---*/
|
||||||
|
var badKey = Object.create(null);
|
||||||
|
|
||||||
|
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
|
0, class {
|
||||||
|
get [badKey]() {}
|
||||||
|
};
|
||||||
|
}, '`get` accessor');
|
||||||
|
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
|
0, class {
|
||||||
|
set [badKey](_) {}
|
||||||
|
};
|
||||||
|
}, '`set` accessor');
|
@ -0,0 +1,36 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed-err-unresolvable.case
|
||||||
|
// - src/accessor-names/error/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion when resolving reference value (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
assert.throws(ReferenceError, function() {
|
||||||
|
0, class {
|
||||||
|
get [test262unresolvable]() {}
|
||||||
|
};
|
||||||
|
}, '`get` accessor');
|
||||||
|
|
||||||
|
assert.throws(ReferenceError, function() {
|
||||||
|
0, class {
|
||||||
|
set [test262unresolvable](_) {}
|
||||||
|
};
|
||||||
|
}, '`set` accessor');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed.case
|
||||||
|
// - src/accessor-names/default/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (AssignmentExpression) (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
var _;
|
||||||
|
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get [_ = 'str' + 'ing']() { return 'get string'; }
|
||||||
|
set [_ = 'str' + 'ing'](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['string'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['string'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-binary.case
|
||||||
|
// - src/accessor-names/default/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in binary notation) (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get 0b10() { return 'get string'; }
|
||||||
|
set 0b10(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['2'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['2'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-exponent.case
|
||||||
|
// - src/accessor-names/default/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in exponent notation) (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get 1E+9() { return 'get string'; }
|
||||||
|
set 1E+9(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['1000000000'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['1000000000'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-hex.case
|
||||||
|
// - src/accessor-names/default/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in hexadecimal notation) (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get 0x10() { return 'get string'; }
|
||||||
|
set 0x10(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['16'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['16'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-leading-decimal.case
|
||||||
|
// - src/accessor-names/default/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with leading decimal point) (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get .1() { return 'get string'; }
|
||||||
|
set .1(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['0.1'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['0.1'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-non-canonical.case
|
||||||
|
// - src/accessor-names/default/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with non-canonical representation) (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get 0.0000001() { return 'get string'; }
|
||||||
|
set 0.0000001(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['1e-7'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['1e-7'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-octal.case
|
||||||
|
// - src/accessor-names/default/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in octal notation) (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get 0o10() { return 'get string'; }
|
||||||
|
set 0o10(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['8'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['8'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-zero.case
|
||||||
|
// - src/accessor-names/default/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal zero) (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get 0() { return 'get string'; }
|
||||||
|
set 0(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['0'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['0'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-char-escape.case
|
||||||
|
// - src/accessor-names/default/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a character escape sequence) (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get 'character\tescape'() { return 'get string'; }
|
||||||
|
set 'character\tescape'(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['character escape'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['character escape'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-double-quote.case
|
||||||
|
// - src/accessor-names/default/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using double quotes) (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get "doubleQuote"() { return 'get string'; }
|
||||||
|
set "doubleQuote"(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype["doubleQuote"], 'get string');
|
||||||
|
|
||||||
|
C.prototype["doubleQuote"] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-empty.case
|
||||||
|
// - src/accessor-names/default/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal, the empty string) (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get ''() { return 'get string'; }
|
||||||
|
set ''(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype[''], 'get string');
|
||||||
|
|
||||||
|
C.prototype[''] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-hex-escape.case
|
||||||
|
// - src/accessor-names/default/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a hexadecimal escape sequence) (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get 'hex\x45scape'() { return 'get string'; }
|
||||||
|
set 'hex\x45scape'(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['hexEscape'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['hexEscape'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-single-quote.case
|
||||||
|
// - src/accessor-names/default/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using single quotes) (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get 'singleQuote'() { return 'get string'; }
|
||||||
|
set 'singleQuote'(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['singleQuote'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['singleQuote'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-unicode-escape.case
|
||||||
|
// - src/accessor-names/default/cls-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a Unicode escape sequence) (Class expression, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get 'unicod\u{000065}Escape'() { return 'get string'; }
|
||||||
|
set 'unicod\u{000065}Escape'(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['unicodeEscape'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['unicodeEscape'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,40 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed-err-evaluation.case
|
||||||
|
// - src/accessor-names/error/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion when evaluating expression (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
---*/
|
||||||
|
var thrower = function() {
|
||||||
|
throw new Test262Error();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.throws(Test262Error, function() {
|
||||||
|
0, class {
|
||||||
|
static get [thrower()]() {}
|
||||||
|
};
|
||||||
|
}, '`get` accessor');
|
||||||
|
|
||||||
|
assert.throws(Test262Error, function() {
|
||||||
|
0, class {
|
||||||
|
static set [thrower()](_) {}
|
||||||
|
};
|
||||||
|
}, '`set` accessor');
|
@ -0,0 +1,56 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed-err-to-prop-key.case
|
||||||
|
// - src/accessor-names/error/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion when coercing to property key value (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
|
||||||
|
7.1.14 ToPropertyKey
|
||||||
|
|
||||||
|
1. Let key be ? ToPrimitive(argument, hint String).
|
||||||
|
|
||||||
|
7.1.1 ToPrimitive
|
||||||
|
|
||||||
|
[...]
|
||||||
|
7. Return ? OrdinaryToPrimitive(input, hint).
|
||||||
|
|
||||||
|
7.1.1.1 OrdinaryToPrimitive
|
||||||
|
|
||||||
|
5. For each name in methodNames in List order, do
|
||||||
|
[...]
|
||||||
|
6. Throw a TypeError exception.
|
||||||
|
---*/
|
||||||
|
var badKey = Object.create(null);
|
||||||
|
|
||||||
|
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
|
0, class {
|
||||||
|
static get [badKey]() {}
|
||||||
|
};
|
||||||
|
}, '`get` accessor');
|
||||||
|
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
|
0, class {
|
||||||
|
static set [badKey](_) {}
|
||||||
|
};
|
||||||
|
}, '`set` accessor');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed-err-unresolvable.case
|
||||||
|
// - src/accessor-names/error/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion when resolving reference value (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
assert.throws(ReferenceError, function() {
|
||||||
|
0, class {
|
||||||
|
static get [test262unresolvable]() {}
|
||||||
|
};
|
||||||
|
}, '`get` accessor');
|
||||||
|
|
||||||
|
assert.throws(ReferenceError, function() {
|
||||||
|
0, class {
|
||||||
|
static set [test262unresolvable](_) {}
|
||||||
|
};
|
||||||
|
}, '`set` accessor');
|
@ -0,0 +1,41 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed.case
|
||||||
|
// - src/accessor-names/default/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (AssignmentExpression) (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
var _;
|
||||||
|
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get [_ = 'str' + 'ing']() { return 'get string'; }
|
||||||
|
static set [_ = 'str' + 'ing'](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C['string'], 'get string');
|
||||||
|
|
||||||
|
C['string'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-binary.case
|
||||||
|
// - src/accessor-names/default/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in binary notation) (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get 0b10() { return 'get string'; }
|
||||||
|
static set 0b10(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C['2'], 'get string');
|
||||||
|
|
||||||
|
C['2'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-exponent.case
|
||||||
|
// - src/accessor-names/default/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in exponent notation) (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get 1E+9() { return 'get string'; }
|
||||||
|
static set 1E+9(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C['1000000000'], 'get string');
|
||||||
|
|
||||||
|
C['1000000000'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-hex.case
|
||||||
|
// - src/accessor-names/default/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in hexadecimal notation) (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get 0x10() { return 'get string'; }
|
||||||
|
static set 0x10(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C['16'], 'get string');
|
||||||
|
|
||||||
|
C['16'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-leading-decimal.case
|
||||||
|
// - src/accessor-names/default/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with leading decimal point) (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get .1() { return 'get string'; }
|
||||||
|
static set .1(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C['0.1'], 'get string');
|
||||||
|
|
||||||
|
C['0.1'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-non-canonical.case
|
||||||
|
// - src/accessor-names/default/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with non-canonical representation) (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get 0.0000001() { return 'get string'; }
|
||||||
|
static set 0.0000001(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C['1e-7'], 'get string');
|
||||||
|
|
||||||
|
C['1e-7'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-octal.case
|
||||||
|
// - src/accessor-names/default/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in octal notation) (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get 0o10() { return 'get string'; }
|
||||||
|
static set 0o10(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C['8'], 'get string');
|
||||||
|
|
||||||
|
C['8'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-zero.case
|
||||||
|
// - src/accessor-names/default/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal zero) (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get 0() { return 'get string'; }
|
||||||
|
static set 0(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C['0'], 'get string');
|
||||||
|
|
||||||
|
C['0'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-char-escape.case
|
||||||
|
// - src/accessor-names/default/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a character escape sequence) (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get 'character\tescape'() { return 'get string'; }
|
||||||
|
static set 'character\tescape'(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C['character escape'], 'get string');
|
||||||
|
|
||||||
|
C['character escape'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-double-quote.case
|
||||||
|
// - src/accessor-names/default/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using double quotes) (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get "doubleQuote"() { return 'get string'; }
|
||||||
|
static set "doubleQuote"(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C["doubleQuote"], 'get string');
|
||||||
|
|
||||||
|
C["doubleQuote"] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-empty.case
|
||||||
|
// - src/accessor-names/default/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal, the empty string) (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get ''() { return 'get string'; }
|
||||||
|
static set ''(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C[''], 'get string');
|
||||||
|
|
||||||
|
C[''] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-hex-escape.case
|
||||||
|
// - src/accessor-names/default/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a hexadecimal escape sequence) (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get 'hex\x45scape'() { return 'get string'; }
|
||||||
|
static set 'hex\x45scape'(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C['hexEscape'], 'get string');
|
||||||
|
|
||||||
|
C['hexEscape'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-single-quote.case
|
||||||
|
// - src/accessor-names/default/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using single quotes) (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get 'singleQuote'() { return 'get string'; }
|
||||||
|
static set 'singleQuote'(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C['singleQuote'], 'get string');
|
||||||
|
|
||||||
|
C['singleQuote'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-unicode-escape.case
|
||||||
|
// - src/accessor-names/default/cls-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a Unicode escape sequence) (Class expression, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get 'unicod\u{000065}Escape'() { return 'get string'; }
|
||||||
|
static set 'unicod\u{000065}Escape'(param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(C['unicodeEscape'], 'get string');
|
||||||
|
|
||||||
|
C['unicodeEscape'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,40 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed-err-evaluation.case
|
||||||
|
// - src/accessor-names/error/obj.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion when evaluating expression (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
---*/
|
||||||
|
var thrower = function() {
|
||||||
|
throw new Test262Error();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.throws(Test262Error, function() {
|
||||||
|
({
|
||||||
|
get [thrower()]() {}
|
||||||
|
});
|
||||||
|
}, '`get` accessor');
|
||||||
|
|
||||||
|
assert.throws(Test262Error, function() {
|
||||||
|
({
|
||||||
|
set [thrower()](_) {}
|
||||||
|
});
|
||||||
|
}, '`set` accessor');
|
@ -0,0 +1,56 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed-err-to-prop-key.case
|
||||||
|
// - src/accessor-names/error/obj.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion when coercing to property key value (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
|
||||||
|
7.1.14 ToPropertyKey
|
||||||
|
|
||||||
|
1. Let key be ? ToPrimitive(argument, hint String).
|
||||||
|
|
||||||
|
7.1.1 ToPrimitive
|
||||||
|
|
||||||
|
[...]
|
||||||
|
7. Return ? OrdinaryToPrimitive(input, hint).
|
||||||
|
|
||||||
|
7.1.1.1 OrdinaryToPrimitive
|
||||||
|
|
||||||
|
5. For each name in methodNames in List order, do
|
||||||
|
[...]
|
||||||
|
6. Throw a TypeError exception.
|
||||||
|
---*/
|
||||||
|
var badKey = Object.create(null);
|
||||||
|
|
||||||
|
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
|
({
|
||||||
|
get [badKey]() {}
|
||||||
|
});
|
||||||
|
}, '`get` accessor');
|
||||||
|
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
|
({
|
||||||
|
set [badKey](_) {}
|
||||||
|
});
|
||||||
|
}, '`set` accessor');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed-err-unresolvable.case
|
||||||
|
// - src/accessor-names/error/obj.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion when resolving reference value (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
assert.throws(ReferenceError, function() {
|
||||||
|
({
|
||||||
|
get [test262unresolvable]() {}
|
||||||
|
});
|
||||||
|
}, '`get` accessor');
|
||||||
|
|
||||||
|
assert.throws(ReferenceError, function() {
|
||||||
|
({
|
||||||
|
set [test262unresolvable](_) {}
|
||||||
|
});
|
||||||
|
}, '`set` accessor');
|
40
test/language/expressions/object/accessor-name-computed.js
Normal file
40
test/language/expressions/object/accessor-name-computed.js
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed.case
|
||||||
|
// - src/accessor-names/default/obj.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (AssignmentExpression) (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
var _;
|
||||||
|
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
var obj = {
|
||||||
|
get [[_ = 'str' + 'ing']]() { return 'get string'; },
|
||||||
|
set [[_ = 'str' + 'ing']](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(obj['string'], 'get string');
|
||||||
|
|
||||||
|
obj['string'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-binary.case
|
||||||
|
// - src/accessor-names/default/obj.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in binary notation) (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
var obj = {
|
||||||
|
get [0b10]() { return 'get string'; },
|
||||||
|
set [0b10](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(obj['2'], 'get string');
|
||||||
|
|
||||||
|
obj['2'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-exponent.case
|
||||||
|
// - src/accessor-names/default/obj.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in exponent notation) (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
var obj = {
|
||||||
|
get [1E+9]() { return 'get string'; },
|
||||||
|
set [1E+9](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(obj['1000000000'], 'get string');
|
||||||
|
|
||||||
|
obj['1000000000'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-hex.case
|
||||||
|
// - src/accessor-names/default/obj.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in hexadecimal notation) (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
var obj = {
|
||||||
|
get [0x10]() { return 'get string'; },
|
||||||
|
set [0x10](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(obj['16'], 'get string');
|
||||||
|
|
||||||
|
obj['16'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-leading-decimal.case
|
||||||
|
// - src/accessor-names/default/obj.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with leading decimal point) (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
var obj = {
|
||||||
|
get [.1]() { return 'get string'; },
|
||||||
|
set [.1](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(obj['0.1'], 'get string');
|
||||||
|
|
||||||
|
obj['0.1'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-non-canonical.case
|
||||||
|
// - src/accessor-names/default/obj.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with non-canonical representation) (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
var obj = {
|
||||||
|
get [0.0000001]() { return 'get string'; },
|
||||||
|
set [0.0000001](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(obj['1e-7'], 'get string');
|
||||||
|
|
||||||
|
obj['1e-7'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-octal.case
|
||||||
|
// - src/accessor-names/default/obj.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in octal notation) (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
var obj = {
|
||||||
|
get [0o10]() { return 'get string'; },
|
||||||
|
set [0o10](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(obj['8'], 'get string');
|
||||||
|
|
||||||
|
obj['8'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-zero.case
|
||||||
|
// - src/accessor-names/default/obj.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal zero) (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
var obj = {
|
||||||
|
get [0]() { return 'get string'; },
|
||||||
|
set [0](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(obj['0'], 'get string');
|
||||||
|
|
||||||
|
obj['0'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-char-escape.case
|
||||||
|
// - src/accessor-names/default/obj.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a character escape sequence) (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
var obj = {
|
||||||
|
get ['character\tescape']() { return 'get string'; },
|
||||||
|
set ['character\tescape'](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(obj['character escape'], 'get string');
|
||||||
|
|
||||||
|
obj['character escape'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-double-quote.case
|
||||||
|
// - src/accessor-names/default/obj.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using double quotes) (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
var obj = {
|
||||||
|
get ["doubleQuote"]() { return 'get string'; },
|
||||||
|
set ["doubleQuote"](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(obj["doubleQuote"], 'get string');
|
||||||
|
|
||||||
|
obj["doubleQuote"] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-empty.case
|
||||||
|
// - src/accessor-names/default/obj.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal, the empty string) (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
var obj = {
|
||||||
|
get ['']() { return 'get string'; },
|
||||||
|
set [''](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(obj[''], 'get string');
|
||||||
|
|
||||||
|
obj[''] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-hex-escape.case
|
||||||
|
// - src/accessor-names/default/obj.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a hexadecimal escape sequence) (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
var obj = {
|
||||||
|
get ['hex\x45scape']() { return 'get string'; },
|
||||||
|
set ['hex\x45scape'](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(obj['hexEscape'], 'get string');
|
||||||
|
|
||||||
|
obj['hexEscape'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-single-quote.case
|
||||||
|
// - src/accessor-names/default/obj.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using single quotes) (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
var obj = {
|
||||||
|
get ['singleQuote']() { return 'get string'; },
|
||||||
|
set ['singleQuote'](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(obj['singleQuote'], 'get string');
|
||||||
|
|
||||||
|
obj['singleQuote'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-unicode-escape.case
|
||||||
|
// - src/accessor-names/default/obj.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a Unicode escape sequence) (Object initializer)
|
||||||
|
esid: sec-object-initializer-runtime-semantics-evaluation
|
||||||
|
es6id: 12.2.6.8
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
ObjectLiteral :
|
||||||
|
{ PropertyDefinitionList }
|
||||||
|
{ PropertyDefinitionList , }
|
||||||
|
|
||||||
|
1. Let obj be ObjectCreate(%ObjectPrototype%).
|
||||||
|
2. Let status be the result of performing PropertyDefinitionEvaluation of
|
||||||
|
PropertyDefinitionList with arguments obj and true.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
var obj = {
|
||||||
|
get ['unicod\u{000065}Escape']() { return 'get string'; },
|
||||||
|
set ['unicod\u{000065}Escape'](param) { stringSet = param; }
|
||||||
|
};
|
||||||
|
|
||||||
|
assert.sameValue(obj['unicodeEscape'], 'get string');
|
||||||
|
|
||||||
|
obj['unicodeEscape'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed-err-evaluation.case
|
||||||
|
// - src/accessor-names/error/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion when evaluating expression (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
---*/
|
||||||
|
var thrower = function() {
|
||||||
|
throw new Test262Error();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.throws(Test262Error, function() {
|
||||||
|
class C {
|
||||||
|
get [thrower()]() {}
|
||||||
|
}
|
||||||
|
}, '`get` accessor');
|
||||||
|
|
||||||
|
assert.throws(Test262Error, function() {
|
||||||
|
class C {
|
||||||
|
set [thrower()](_) {}
|
||||||
|
}
|
||||||
|
}, '`set` accessor');
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed-err-to-prop-key.case
|
||||||
|
// - src/accessor-names/error/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion when coercing to property key value (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
|
||||||
|
7.1.14 ToPropertyKey
|
||||||
|
|
||||||
|
1. Let key be ? ToPrimitive(argument, hint String).
|
||||||
|
|
||||||
|
7.1.1 ToPrimitive
|
||||||
|
|
||||||
|
[...]
|
||||||
|
7. Return ? OrdinaryToPrimitive(input, hint).
|
||||||
|
|
||||||
|
7.1.1.1 OrdinaryToPrimitive
|
||||||
|
|
||||||
|
5. For each name in methodNames in List order, do
|
||||||
|
[...]
|
||||||
|
6. Throw a TypeError exception.
|
||||||
|
---*/
|
||||||
|
var badKey = Object.create(null);
|
||||||
|
|
||||||
|
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
|
class C {
|
||||||
|
get [badKey]() {}
|
||||||
|
}
|
||||||
|
}, '`get` accessor');
|
||||||
|
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
|
class C {
|
||||||
|
set [badKey](_) {}
|
||||||
|
}
|
||||||
|
}, '`set` accessor');
|
@ -0,0 +1,36 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed-err-unresolvable.case
|
||||||
|
// - src/accessor-names/error/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion when resolving reference value (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
assert.throws(ReferenceError, function() {
|
||||||
|
class C {
|
||||||
|
get [test262unresolvable]() {}
|
||||||
|
}
|
||||||
|
}, '`get` accessor');
|
||||||
|
|
||||||
|
assert.throws(ReferenceError, function() {
|
||||||
|
class C {
|
||||||
|
set [test262unresolvable](_) {}
|
||||||
|
}
|
||||||
|
}, '`set` accessor');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed.case
|
||||||
|
// - src/accessor-names/default/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (AssignmentExpression) (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
var _;
|
||||||
|
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get [_ = 'str' + 'ing']() { return 'get string'; }
|
||||||
|
set [_ = 'str' + 'ing'](param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['string'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['string'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-binary.case
|
||||||
|
// - src/accessor-names/default/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in binary notation) (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get 0b10() { return 'get string'; }
|
||||||
|
set 0b10(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['2'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['2'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-exponent.case
|
||||||
|
// - src/accessor-names/default/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in exponent notation) (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get 1E+9() { return 'get string'; }
|
||||||
|
set 1E+9(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['1000000000'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['1000000000'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-hex.case
|
||||||
|
// - src/accessor-names/default/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in hexadecimal notation) (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get 0x10() { return 'get string'; }
|
||||||
|
set 0x10(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['16'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['16'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-leading-decimal.case
|
||||||
|
// - src/accessor-names/default/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with leading decimal point) (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get .1() { return 'get string'; }
|
||||||
|
set .1(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['0.1'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['0.1'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-non-canonical.case
|
||||||
|
// - src/accessor-names/default/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with non-canonical representation) (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get 0.0000001() { return 'get string'; }
|
||||||
|
set 0.0000001(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['1e-7'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['1e-7'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-octal.case
|
||||||
|
// - src/accessor-names/default/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in octal notation) (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get 0o10() { return 'get string'; }
|
||||||
|
set 0o10(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['8'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['8'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-zero.case
|
||||||
|
// - src/accessor-names/default/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal zero) (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get 0() { return 'get string'; }
|
||||||
|
set 0(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['0'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['0'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-char-escape.case
|
||||||
|
// - src/accessor-names/default/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a character escape sequence) (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get 'character\tescape'() { return 'get string'; }
|
||||||
|
set 'character\tescape'(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['character escape'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['character escape'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-double-quote.case
|
||||||
|
// - src/accessor-names/default/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using double quotes) (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get "doubleQuote"() { return 'get string'; }
|
||||||
|
set "doubleQuote"(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype["doubleQuote"], 'get string');
|
||||||
|
|
||||||
|
C.prototype["doubleQuote"] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-empty.case
|
||||||
|
// - src/accessor-names/default/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal, the empty string) (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get ''() { return 'get string'; }
|
||||||
|
set ''(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype[''], 'get string');
|
||||||
|
|
||||||
|
C.prototype[''] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-hex-escape.case
|
||||||
|
// - src/accessor-names/default/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a hexadecimal escape sequence) (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get 'hex\x45scape'() { return 'get string'; }
|
||||||
|
set 'hex\x45scape'(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['hexEscape'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['hexEscape'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-single-quote.case
|
||||||
|
// - src/accessor-names/default/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using single quotes) (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get 'singleQuote'() { return 'get string'; }
|
||||||
|
set 'singleQuote'(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['singleQuote'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['singleQuote'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,37 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-unicode-escape.case
|
||||||
|
// - src/accessor-names/default/cls-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a Unicode escape sequence) (Class declaration, instance method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
i. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments proto and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get 'unicod\u{000065}Escape'() { return 'get string'; }
|
||||||
|
set 'unicod\u{000065}Escape'(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.prototype['unicodeEscape'], 'get string');
|
||||||
|
|
||||||
|
C.prototype['unicodeEscape'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,40 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed-err-evaluation.case
|
||||||
|
// - src/accessor-names/error/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion when evaluating expression (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
---*/
|
||||||
|
var thrower = function() {
|
||||||
|
throw new Test262Error();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.throws(Test262Error, function() {
|
||||||
|
class C {
|
||||||
|
static get [thrower()]() {}
|
||||||
|
}
|
||||||
|
}, '`get` accessor');
|
||||||
|
|
||||||
|
assert.throws(Test262Error, function() {
|
||||||
|
class C {
|
||||||
|
static set [thrower()](_) {}
|
||||||
|
}
|
||||||
|
}, '`set` accessor');
|
@ -0,0 +1,56 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed-err-to-prop-key.case
|
||||||
|
// - src/accessor-names/error/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion when coercing to property key value (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
|
||||||
|
7.1.14 ToPropertyKey
|
||||||
|
|
||||||
|
1. Let key be ? ToPrimitive(argument, hint String).
|
||||||
|
|
||||||
|
7.1.1 ToPrimitive
|
||||||
|
|
||||||
|
[...]
|
||||||
|
7. Return ? OrdinaryToPrimitive(input, hint).
|
||||||
|
|
||||||
|
7.1.1.1 OrdinaryToPrimitive
|
||||||
|
|
||||||
|
5. For each name in methodNames in List order, do
|
||||||
|
[...]
|
||||||
|
6. Throw a TypeError exception.
|
||||||
|
---*/
|
||||||
|
var badKey = Object.create(null);
|
||||||
|
|
||||||
|
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
|
class C {
|
||||||
|
static get [badKey]() {}
|
||||||
|
}
|
||||||
|
}, '`get` accessor');
|
||||||
|
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
|
class C {
|
||||||
|
static set [badKey](_) {}
|
||||||
|
}
|
||||||
|
}, '`set` accessor');
|
@ -0,0 +1,38 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed-err-unresolvable.case
|
||||||
|
// - src/accessor-names/error/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Abrupt completion when resolving reference value (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
assert.throws(ReferenceError, function() {
|
||||||
|
class C {
|
||||||
|
static get [test262unresolvable]() {}
|
||||||
|
}
|
||||||
|
}, '`get` accessor');
|
||||||
|
|
||||||
|
assert.throws(ReferenceError, function() {
|
||||||
|
class C {
|
||||||
|
static set [test262unresolvable](_) {}
|
||||||
|
}
|
||||||
|
}, '`set` accessor');
|
@ -0,0 +1,41 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed.case
|
||||||
|
// - src/accessor-names/default/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (AssignmentExpression) (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
var _;
|
||||||
|
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get [_ = 'str' + 'ing']() { return 'get string'; }
|
||||||
|
static set [_ = 'str' + 'ing'](param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C['string'], 'get string');
|
||||||
|
|
||||||
|
C['string'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-binary.case
|
||||||
|
// - src/accessor-names/default/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in binary notation) (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get 0b10() { return 'get string'; }
|
||||||
|
static set 0b10(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C['2'], 'get string');
|
||||||
|
|
||||||
|
C['2'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-exponent.case
|
||||||
|
// - src/accessor-names/default/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in exponent notation) (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get 1E+9() { return 'get string'; }
|
||||||
|
static set 1E+9(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C['1000000000'], 'get string');
|
||||||
|
|
||||||
|
C['1000000000'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-hex.case
|
||||||
|
// - src/accessor-names/default/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in hexadecimal notation) (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get 0x10() { return 'get string'; }
|
||||||
|
static set 0x10(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C['16'], 'get string');
|
||||||
|
|
||||||
|
C['16'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-leading-decimal.case
|
||||||
|
// - src/accessor-names/default/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with leading decimal point) (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get .1() { return 'get string'; }
|
||||||
|
static set .1(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C['0.1'], 'get string');
|
||||||
|
|
||||||
|
C['0.1'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-non-canonical.case
|
||||||
|
// - src/accessor-names/default/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with non-canonical representation) (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get 0.0000001() { return 'get string'; }
|
||||||
|
static set 0.0000001(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C['1e-7'], 'get string');
|
||||||
|
|
||||||
|
C['1e-7'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-octal.case
|
||||||
|
// - src/accessor-names/default/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in octal notation) (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get 0o10() { return 'get string'; }
|
||||||
|
static set 0o10(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C['8'], 'get string');
|
||||||
|
|
||||||
|
C['8'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-zero.case
|
||||||
|
// - src/accessor-names/default/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal zero) (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get 0() { return 'get string'; }
|
||||||
|
static set 0(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C['0'], 'get string');
|
||||||
|
|
||||||
|
C['0'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-char-escape.case
|
||||||
|
// - src/accessor-names/default/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a character escape sequence) (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get 'character\tescape'() { return 'get string'; }
|
||||||
|
static set 'character\tescape'(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C['character escape'], 'get string');
|
||||||
|
|
||||||
|
C['character escape'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-double-quote.case
|
||||||
|
// - src/accessor-names/default/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using double quotes) (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get "doubleQuote"() { return 'get string'; }
|
||||||
|
static set "doubleQuote"(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C["doubleQuote"], 'get string');
|
||||||
|
|
||||||
|
C["doubleQuote"] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-empty.case
|
||||||
|
// - src/accessor-names/default/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal, the empty string) (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get ''() { return 'get string'; }
|
||||||
|
static set ''(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C[''], 'get string');
|
||||||
|
|
||||||
|
C[''] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-hex-escape.case
|
||||||
|
// - src/accessor-names/default/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a hexadecimal escape sequence) (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get 'hex\x45scape'() { return 'get string'; }
|
||||||
|
static set 'hex\x45scape'(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C['hexEscape'], 'get string');
|
||||||
|
|
||||||
|
C['hexEscape'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-single-quote.case
|
||||||
|
// - src/accessor-names/default/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using single quotes) (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get 'singleQuote'() { return 'get string'; }
|
||||||
|
static set 'singleQuote'(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C['singleQuote'], 'get string');
|
||||||
|
|
||||||
|
C['singleQuote'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,39 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-unicode-escape.case
|
||||||
|
// - src/accessor-names/default/cls-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a Unicode escape sequence) (Class declaration, static method)
|
||||||
|
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||||
|
es6id: 14.5.14
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
21. For each ClassElement m in order from methods
|
||||||
|
a. If IsStatic of m is false, then
|
||||||
|
[...]
|
||||||
|
b. Else,
|
||||||
|
a. Let status be the result of performing PropertyDefinitionEvaluation
|
||||||
|
for m with arguments F and false.
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get 'unicod\u{000065}Escape'() { return 'get string'; }
|
||||||
|
static set 'unicod\u{000065}Escape'(param) { stringSet = param; }
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C['unicodeEscape'], 'get string');
|
||||||
|
|
||||||
|
C['unicodeEscape'] = 'set string';
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
Loading…
x
Reference in New Issue
Block a user