mirror of https://github.com/tc39/test262.git
Generate tests
This commit is contained in:
parent
28a2495c3c
commit
5b7b007af5
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: Computed property names (field definitions after a generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions after a generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: Literal property names (field definitions after a generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/private-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: static literal private names (field definitions after a generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: Static Computed property names (field definitions after a generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: Static computed property symbol names (field definitions after a generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
@ -25,7 +25,7 @@ var y = Symbol();
|
|||
|
||||
|
||||
var C = class {
|
||||
*m() { return 42; } [x]; [y] = 42;
|
||||
*m() { return 42; } static [x]; static [y] = 42;
|
||||
|
||||
}
|
||||
|
||||
|
@ -42,9 +42,9 @@ verifyProperty(C.prototype, "m", {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, x), false);
|
||||
|
||||
verifyProperty(c, x, {
|
||||
verifyProperty(C, x, {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
@ -52,9 +52,9 @@ verifyProperty(c, x, {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, y), false);
|
||||
|
||||
verifyProperty(c, y, {
|
||||
verifyProperty(C, y, {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: Static literal property names (field definitions after a generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: literal private names (field definitions after a generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-gen.template
|
||||
/*---
|
||||
description: String literal names (field definitions after a generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: Computed property names (field definitions after a method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions after a method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: Literal property names (field definitions after a method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/private-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: static literal private names (field definitions after a method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: Static Computed property names (field definitions after a method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: Static computed property symbol names (field definitions after a method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
@ -25,7 +25,7 @@ var y = Symbol();
|
|||
|
||||
|
||||
var C = class {
|
||||
m() { return 42; } [x]; [y] = 42;
|
||||
m() { return 42; } static [x]; static [y] = 42;
|
||||
|
||||
}
|
||||
|
||||
|
@ -42,9 +42,9 @@ verifyProperty(C.prototype, "m", {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, x), false);
|
||||
|
||||
verifyProperty(c, x, {
|
||||
verifyProperty(C, x, {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
@ -52,9 +52,9 @@ verifyProperty(c, x, {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, y), false);
|
||||
|
||||
verifyProperty(c, y, {
|
||||
verifyProperty(C, y, {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: Static literal property names (field definitions after a method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: literal private names (field definitions after a method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-method.template
|
||||
/*---
|
||||
description: String literal names (field definitions after a method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template
|
||||
/*---
|
||||
description: Computed property names (field definitions after a static async generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions after a static async generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template
|
||||
/*---
|
||||
description: Literal property names (field definitions after a static async generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/private-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template
|
||||
/*---
|
||||
description: static literal private names (field definitions after a static async generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template
|
||||
/*---
|
||||
description: Static Computed property names (field definitions after a static async generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template
|
||||
/*---
|
||||
description: Static computed property symbol names (field definitions after a static async generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
@ -25,7 +25,7 @@ var y = Symbol();
|
|||
|
||||
|
||||
var C = class {
|
||||
static async *m() { return 42; } [x]; [y] = 42;
|
||||
static async *m() { return 42; } static [x]; static [y] = 42;
|
||||
|
||||
}
|
||||
|
||||
|
@ -41,9 +41,9 @@ verifyProperty(C, "m", {
|
|||
}, {restore: true});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, x), false);
|
||||
|
||||
verifyProperty(c, x, {
|
||||
verifyProperty(C, x, {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
@ -51,9 +51,9 @@ verifyProperty(c, x, {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, y), false);
|
||||
|
||||
verifyProperty(c, y, {
|
||||
verifyProperty(C, y, {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template
|
||||
/*---
|
||||
description: Static literal property names (field definitions after a static async generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template
|
||||
/*---
|
||||
description: literal private names (field definitions after a static async generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-gen.template
|
||||
/*---
|
||||
description: String literal names (field definitions after a static async generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template
|
||||
/*---
|
||||
description: Computed property names (field definitions after a static async method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions after a static async method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template
|
||||
/*---
|
||||
description: Literal property names (field definitions after a static async method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/private-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template
|
||||
/*---
|
||||
description: static literal private names (field definitions after a static async method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template
|
||||
/*---
|
||||
description: Static Computed property names (field definitions after a static async method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template
|
||||
/*---
|
||||
description: Static computed property symbol names (field definitions after a static async method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
@ -25,7 +25,7 @@ var y = Symbol();
|
|||
|
||||
|
||||
var C = class {
|
||||
static async m() { return 42; } [x]; [y] = 42;
|
||||
static async m() { return 42; } static [x]; static [y] = 42;
|
||||
|
||||
}
|
||||
|
||||
|
@ -41,9 +41,9 @@ verifyProperty(C, "m", {
|
|||
}, {restore: true});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, x), false);
|
||||
|
||||
verifyProperty(c, x, {
|
||||
verifyProperty(C, x, {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
@ -51,9 +51,9 @@ verifyProperty(c, x, {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, y), false);
|
||||
|
||||
verifyProperty(c, y, {
|
||||
verifyProperty(C, y, {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template
|
||||
/*---
|
||||
description: Static literal property names (field definitions after a static async method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template
|
||||
/*---
|
||||
description: literal private names (field definitions after a static async method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-async-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-async-method.template
|
||||
/*---
|
||||
description: String literal names (field definitions after a static async method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: Computed property names (field definitions after a static generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions after a static generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: Literal property names (field definitions after a static generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/private-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: static literal private names (field definitions after a static generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: Static Computed property names (field definitions after a static generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: Static computed property symbol names (field definitions after a static generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
@ -25,7 +25,7 @@ var y = Symbol();
|
|||
|
||||
|
||||
var C = class {
|
||||
static *m() { return 42; } [x]; [y] = 42;
|
||||
static *m() { return 42; } static [x]; static [y] = 42;
|
||||
|
||||
}
|
||||
|
||||
|
@ -42,9 +42,9 @@ verifyProperty(C, "m", {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, x), false);
|
||||
|
||||
verifyProperty(c, x, {
|
||||
verifyProperty(C, x, {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
@ -52,9 +52,9 @@ verifyProperty(c, x, {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, y), false);
|
||||
|
||||
verifyProperty(c, y, {
|
||||
verifyProperty(C, y, {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: Static literal property names (field definitions after a static generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: literal private names (field definitions after a static generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-gen.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-gen.template
|
||||
/*---
|
||||
description: String literal names (field definitions after a static generator in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: Computed property names (field definitions after a static method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions after a static method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: Literal property names (field definitions after a static method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/private-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: static literal private names (field definitions after a static method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: Static Computed property names (field definitions after a static method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: Static computed property symbol names (field definitions after a static method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
@ -25,7 +25,7 @@ var y = Symbol();
|
|||
|
||||
|
||||
var C = class {
|
||||
static m() { return 42; } [x]; [y] = 42;
|
||||
static m() { return 42; } static [x]; static [y] = 42;
|
||||
|
||||
}
|
||||
|
||||
|
@ -42,9 +42,9 @@ verifyProperty(C, "m", {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, x), false);
|
||||
|
||||
verifyProperty(c, x, {
|
||||
verifyProperty(C, x, {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
@ -52,9 +52,9 @@ verifyProperty(c, x, {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, y), false);
|
||||
|
||||
verifyProperty(c, y, {
|
||||
verifyProperty(C, y, {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: Static literal property names (field definitions after a static method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: literal private names (field definitions after a static method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-after-same-line-static-method.template
|
||||
// - src/class-fields/productions/cls-expr-after-same-line-static-method.template
|
||||
/*---
|
||||
description: String literal names (field definitions after a static method in the same line)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-name-toprimitive-symbol.case
|
||||
// - src/class-fields/default/cls-expr.template
|
||||
/*---
|
||||
description: ToPrimitive evaluation in the ComputedPropertyName (field definitions in a class expression)
|
||||
esid: prod-FieldDefinition
|
||||
features: [computed-property-names, Symbol.toPrimitive, Symbol, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
...
|
||||
27. For each ClassElement e in order from elements
|
||||
a. If IsStatic of me is false, then
|
||||
i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false.
|
||||
b. Else,
|
||||
i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false.
|
||||
c. If fields is an abrupt completion, then
|
||||
i. Set the running execution context's LexicalEnvironment to lex.
|
||||
ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment.
|
||||
iii. Return Completion(status).
|
||||
...
|
||||
|
||||
Runtime Semantics: ClassElementEvaluation
|
||||
|
||||
ClassElement: static FieldDefinition;
|
||||
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object.
|
||||
|
||||
ClassElement: FieldDefinition;
|
||||
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
|
||||
|
||||
Runtime Semantics: ClassFieldDefinitionEvaluation
|
||||
With parameters isStatic and homeObject.
|
||||
|
||||
1. Let fieldName be the result of evaluating ClassElementName.
|
||||
2. ReturnIfAbrupt(fieldName).
|
||||
...
|
||||
|
||||
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 s1 = Symbol();
|
||||
var s2 = Symbol();
|
||||
var s3 = Symbol();
|
||||
var err = function() { throw new Test262Error(); };
|
||||
var obj1 = {
|
||||
[Symbol.toPrimitive]: function() { return s1; },
|
||||
toString: err,
|
||||
valueOf: err
|
||||
};
|
||||
|
||||
var obj2 = {
|
||||
toString: function() { return s2; },
|
||||
valueOf: err
|
||||
};
|
||||
|
||||
var obj3 = {
|
||||
toString: undefined,
|
||||
valueOf: function() { return s3; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
[obj1] = 42;
|
||||
[obj2] = 43;
|
||||
[obj3] = 44;
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, s1), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, s1), false);
|
||||
|
||||
verifyProperty(c, s1, {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, s2), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, s2), false);
|
||||
|
||||
verifyProperty(c, s2, {
|
||||
value: 43,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, s3), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, s3), false);
|
||||
|
||||
verifyProperty(c, s3, {
|
||||
value: 44,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
|
@ -0,0 +1,103 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-name-toprimitive.case
|
||||
// - src/class-fields/default/cls-expr.template
|
||||
/*---
|
||||
description: ToPrimitive evaluation in the ComputedPropertyName (field definitions in a class expression)
|
||||
esid: prod-FieldDefinition
|
||||
features: [computed-property-names, Symbol.toPrimitive, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
...
|
||||
27. For each ClassElement e in order from elements
|
||||
a. If IsStatic of me is false, then
|
||||
i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false.
|
||||
b. Else,
|
||||
i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false.
|
||||
c. If fields is an abrupt completion, then
|
||||
i. Set the running execution context's LexicalEnvironment to lex.
|
||||
ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment.
|
||||
iii. Return Completion(status).
|
||||
...
|
||||
|
||||
Runtime Semantics: ClassElementEvaluation
|
||||
|
||||
ClassElement: static FieldDefinition;
|
||||
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object.
|
||||
|
||||
ClassElement: FieldDefinition;
|
||||
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
|
||||
|
||||
Runtime Semantics: ClassFieldDefinitionEvaluation
|
||||
With parameters isStatic and homeObject.
|
||||
|
||||
1. Let fieldName be the result of evaluating ClassElementName.
|
||||
2. ReturnIfAbrupt(fieldName).
|
||||
...
|
||||
|
||||
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 err = function() { throw new Test262Error(); };
|
||||
var obj1 = {
|
||||
[Symbol.toPrimitive]: function() { return "d"; },
|
||||
toString: err,
|
||||
valueOf: err
|
||||
};
|
||||
|
||||
var obj2 = {
|
||||
toString: function() { return "e"; },
|
||||
valueOf: err
|
||||
};
|
||||
|
||||
var obj3 = {
|
||||
toString: undefined,
|
||||
valueOf: function() { return "f"; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
var C = class {
|
||||
[obj1] = 42;
|
||||
[obj2] = 43;
|
||||
[obj3] = 44;
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "d"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "d"), false);
|
||||
|
||||
verifyProperty(c, "d", {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "e"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "e"), false);
|
||||
|
||||
verifyProperty(c, "e", {
|
||||
value: 43,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "f"), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, "f"), false);
|
||||
|
||||
verifyProperty(c, "f", {
|
||||
value: 44,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
|
@ -0,0 +1,33 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/ctor-called-after-fields-init.case
|
||||
// - src/class-fields/default/cls-expr.template
|
||||
/*---
|
||||
description: The constructor method is called after the fields are initalized (field definitions in a class expression)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
info: |
|
||||
[[Construct]] ( argumentsList, newTarget)
|
||||
|
||||
8. If kind is "base", then
|
||||
a. Perform OrdinaryCallBindThis(F, calleeContext, thisArgument).
|
||||
b. Let result be InitializeInstanceFields(thisArgument, F).
|
||||
...
|
||||
...
|
||||
11. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
|
||||
...
|
||||
|
||||
---*/
|
||||
var ctor;
|
||||
|
||||
|
||||
var C = class {
|
||||
constructor() {
|
||||
ctor = this.foo;
|
||||
}
|
||||
foo = 42;
|
||||
}
|
||||
|
||||
var c = new C();
|
||||
|
||||
assert.sameValue(ctor, 42);
|
|
@ -0,0 +1,59 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-name-referenceerror.case
|
||||
// - src/class-fields/class-evaluation-error/cls-expr.template
|
||||
/*---
|
||||
description: ReferenceError evaluating a computed property name (field definitions in a class expression)
|
||||
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||
features: [computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
info: |
|
||||
Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
...
|
||||
27. For each ClassElement e in order from elements
|
||||
a. If IsStatic of me is false, then
|
||||
i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false.
|
||||
b. Else,
|
||||
i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false.
|
||||
c. If fields is an abrupt completion, then
|
||||
i. Set the running execution context's LexicalEnvironment to lex.
|
||||
ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment.
|
||||
iii. Return Completion(status).
|
||||
...
|
||||
|
||||
Runtime Semantics: ClassElementEvaluation
|
||||
|
||||
ClassElement: static FieldDefinition;
|
||||
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object.
|
||||
|
||||
ClassElement: FieldDefinition;
|
||||
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
|
||||
|
||||
Runtime Semantics: ClassFieldDefinitionEvaluation
|
||||
With parameters isStatic and homeObject.
|
||||
|
||||
1. Let fieldName be the result of evaluating ClassElementName.
|
||||
2. ReturnIfAbrupt(fieldName).
|
||||
...
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
ComputedPropertyName: [ AssignmentExpression ]
|
||||
|
||||
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||
2. Let propName be ? GetValue(exprValue).
|
||||
3. Return ? ToPropertyKey(propName).
|
||||
|
||||
---*/
|
||||
function fn() {
|
||||
throw new Test262Error();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function evaluate() {
|
||||
var C = class {
|
||||
[noRef] = fn();
|
||||
};
|
||||
}
|
||||
|
||||
assert.throws(ReferenceError, evaluate);
|
|
@ -0,0 +1,61 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-name-toprimitive-err.case
|
||||
// - src/class-fields/class-evaluation-error/cls-expr.template
|
||||
/*---
|
||||
description: Custom error evaluating a computed property name (field definitions in a class expression)
|
||||
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||
features: [computed-property-names, Symbol.toPrimitive, class-fields]
|
||||
flags: [generated]
|
||||
info: |
|
||||
Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
...
|
||||
27. For each ClassElement e in order from elements
|
||||
a. If IsStatic of me is false, then
|
||||
i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false.
|
||||
b. Else,
|
||||
i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false.
|
||||
c. If fields is an abrupt completion, then
|
||||
i. Set the running execution context's LexicalEnvironment to lex.
|
||||
ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment.
|
||||
iii. Return Completion(status).
|
||||
...
|
||||
|
||||
Runtime Semantics: ClassElementEvaluation
|
||||
|
||||
ClassElement: static FieldDefinition;
|
||||
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object.
|
||||
|
||||
ClassElement: FieldDefinition;
|
||||
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
|
||||
|
||||
Runtime Semantics: ClassFieldDefinitionEvaluation
|
||||
With parameters isStatic and homeObject.
|
||||
|
||||
1. Let fieldName be the result of evaluating ClassElementName.
|
||||
2. ReturnIfAbrupt(fieldName).
|
||||
...
|
||||
|
||||
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 obj = {
|
||||
[Symbol.toPrimitive]: function() {
|
||||
throw new Test262Error();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
function evaluate() {
|
||||
var C = class {
|
||||
[obj]
|
||||
};
|
||||
}
|
||||
|
||||
assert.throws(Test262Error, evaluate);
|
|
@ -0,0 +1,62 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-name-tostring-err.case
|
||||
// - src/class-fields/class-evaluation-error/cls-expr.template
|
||||
/*---
|
||||
description: Custom error evaluating a computed property name (field definitions in a class expression)
|
||||
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||
features: [computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
info: |
|
||||
Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
...
|
||||
27. For each ClassElement e in order from elements
|
||||
a. If IsStatic of me is false, then
|
||||
i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false.
|
||||
b. Else,
|
||||
i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false.
|
||||
c. If fields is an abrupt completion, then
|
||||
i. Set the running execution context's LexicalEnvironment to lex.
|
||||
ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment.
|
||||
iii. Return Completion(status).
|
||||
...
|
||||
|
||||
Runtime Semantics: ClassElementEvaluation
|
||||
|
||||
ClassElement: static FieldDefinition;
|
||||
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object.
|
||||
|
||||
ClassElement: FieldDefinition;
|
||||
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
|
||||
|
||||
Runtime Semantics: ClassFieldDefinitionEvaluation
|
||||
With parameters isStatic and homeObject.
|
||||
|
||||
1. Let fieldName be the result of evaluating ClassElementName.
|
||||
2. ReturnIfAbrupt(fieldName).
|
||||
...
|
||||
|
||||
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 obj = {
|
||||
toString: function() {
|
||||
throw new Test262Error();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
function evaluate() {
|
||||
var C = class {
|
||||
[obj]
|
||||
};
|
||||
}
|
||||
|
||||
assert.throws(Test262Error
|
||||
, evaluate);
|
|
@ -0,0 +1,62 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-name-valueof-err.case
|
||||
// - src/class-fields/class-evaluation-error/cls-expr.template
|
||||
/*---
|
||||
description: Custom error evaluating a computed property name (field definitions in a class expression)
|
||||
esid: sec-runtime-semantics-classdefinitionevaluation
|
||||
features: [computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
info: |
|
||||
Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
...
|
||||
27. For each ClassElement e in order from elements
|
||||
a. If IsStatic of me is false, then
|
||||
i. Let fields be the result of performing ClassElementEvaluation for e with arguments proto and false.
|
||||
b. Else,
|
||||
i. Let fields be the result of performing ClassElementEvaluation for e with arguments F and false.
|
||||
c. If fields is an abrupt completion, then
|
||||
i. Set the running execution context's LexicalEnvironment to lex.
|
||||
ii. Set the running execution context's PrivateNameEnvironment to outerPrivateEnvironment.
|
||||
iii. Return Completion(status).
|
||||
...
|
||||
|
||||
Runtime Semantics: ClassElementEvaluation
|
||||
|
||||
ClassElement: static FieldDefinition;
|
||||
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object.
|
||||
|
||||
ClassElement: FieldDefinition;
|
||||
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
|
||||
|
||||
Runtime Semantics: ClassFieldDefinitionEvaluation
|
||||
With parameters isStatic and homeObject.
|
||||
|
||||
1. Let fieldName be the result of evaluating ClassElementName.
|
||||
2. ReturnIfAbrupt(fieldName).
|
||||
...
|
||||
|
||||
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 obj = {
|
||||
toString: undefined,
|
||||
valueOf: function() {
|
||||
throw new Test262Error();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
function evaluate() {
|
||||
var C = class {
|
||||
[obj]
|
||||
};
|
||||
}
|
||||
|
||||
assert.throws(Test262Error, evaluate);
|
|
@ -0,0 +1,36 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/init-err-evaluation.case
|
||||
// - src/class-fields/default/cls-expr.template
|
||||
/*---
|
||||
description: Return abrupt completion evaluating the field initializer (field definitions in a class expression)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-fields]
|
||||
flags: [generated]
|
||||
info: |
|
||||
[[Construct]] ( argumentsList, newTarget)
|
||||
|
||||
8. If kind is "base", then
|
||||
a. Perform OrdinaryCallBindThis(F, calleeContext, thisArgument).
|
||||
b. Let result be InitializeInstanceFields(thisArgument, F).
|
||||
...
|
||||
...
|
||||
11. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
|
||||
...
|
||||
|
||||
---*/
|
||||
var x = 0;
|
||||
function fn1() { x += 1; }
|
||||
function fn2() { throw new Test262Error(); }
|
||||
|
||||
|
||||
var C = class {
|
||||
x = fn1();
|
||||
y = fn2();
|
||||
z = fn1();
|
||||
}
|
||||
|
||||
assert.throws(Test262Error, function() {
|
||||
new C();
|
||||
});
|
||||
|
||||
assert.sameValue(x, 1);
|
|
@ -0,0 +1,48 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/init-value-defined-after-class.case
|
||||
// - src/class-fields/default/cls-expr.template
|
||||
/*---
|
||||
description: The initializer value is defined after the class evaluation (field definitions in a class expression)
|
||||
esid: prod-FieldDefinition
|
||||
features: [computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
[[Construct]] ( argumentsList, newTarget)
|
||||
|
||||
8. If kind is "base", then
|
||||
a. Perform OrdinaryCallBindThis(F, calleeContext, thisArgument).
|
||||
b. Let result be InitializeInstanceFields(thisArgument, F).
|
||||
...
|
||||
...
|
||||
11. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
|
||||
...
|
||||
|
||||
---*/
|
||||
var x = false;
|
||||
|
||||
|
||||
var C = class {
|
||||
[x] = x;
|
||||
}
|
||||
|
||||
var c1 = new C();
|
||||
|
||||
x = true;
|
||||
var c2 = new C();
|
||||
|
||||
verifyProperty(c1, "false", {
|
||||
value: false,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
verifyProperty(c2, "false", {
|
||||
value: true,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
assert.sameValue(c1.hasOwnProperty("true"), false);
|
||||
assert.sameValue(c2.hasOwnProperty("true"), false);
|
|
@ -0,0 +1,84 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/init-value-incremental.case
|
||||
// - src/class-fields/default/cls-expr.template
|
||||
/*---
|
||||
description: The initializer value is defined during the class instatiation (field definitions in a class expression)
|
||||
esid: prod-FieldDefinition
|
||||
features: [computed-property-names, class-fields]
|
||||
flags: [generated]
|
||||
includes: [propertyHelper.js]
|
||||
info: |
|
||||
Runtime Semantics: ClassDefinitionEvaluation
|
||||
|
||||
27. For each ClassElement e in order from elements
|
||||
...
|
||||
d. Append to fieldRecords the elements of fields.
|
||||
...
|
||||
33. Let result be InitializeStaticFields(F).
|
||||
...
|
||||
|
||||
[[Construct]] ( argumentsList, newTarget)
|
||||
|
||||
8. If kind is "base", then
|
||||
a. Perform OrdinaryCallBindThis(F, calleeContext, thisArgument).
|
||||
b. Let result be InitializeInstanceFields(thisArgument, F).
|
||||
...
|
||||
...
|
||||
11. Let result be OrdinaryCallEvaluateBody(F, argumentsList).
|
||||
...
|
||||
|
||||
---*/
|
||||
var x = 0;
|
||||
|
||||
|
||||
var C = class {
|
||||
static [x++] = x++;
|
||||
[x++] = x++;
|
||||
static [x++] = x++;
|
||||
[x++] = x++;
|
||||
}
|
||||
|
||||
var c1 = new C();
|
||||
var c2 = new C();
|
||||
|
||||
verifyProperty(C, "0", {
|
||||
value: 4,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
verifyProperty(C, "2", {
|
||||
value: 5,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
verifyProperty(c1, "1", {
|
||||
value: 6,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
verifyProperty(c1, "3", {
|
||||
value: 7,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
verifyProperty(c2, "1", {
|
||||
value: 8,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
||||
|
||||
verifyProperty(c2, "3", {
|
||||
value: 9,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
});
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: Computed property names (multiple fields definitions)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: Computed property symbol names (multiple fields definitions)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: Literal property names (multiple fields definitions)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/private-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: static literal private names (multiple fields definitions)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: Static Computed property names (multiple fields definitions)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: Static computed property symbol names (multiple fields definitions)
|
||||
esid: prod-FieldDefinition
|
||||
|
@ -27,7 +27,7 @@ var y = Symbol();
|
|||
var C = class {
|
||||
foo = "foobar";
|
||||
m() { return 42 }
|
||||
[x]; [y] = 42
|
||||
static [x]; static [y] = 42
|
||||
m2() { return 39 }
|
||||
bar = "barbaz";
|
||||
|
||||
|
@ -78,9 +78,9 @@ verifyProperty(c, "bar", {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, x), false);
|
||||
|
||||
verifyProperty(c, x, {
|
||||
verifyProperty(C, x, {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
@ -88,9 +88,9 @@ verifyProperty(c, x, {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, y), false);
|
||||
|
||||
verifyProperty(c, y, {
|
||||
verifyProperty(C, y, {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: Static literal property names (multiple fields definitions)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: literal private names (multiple fields definitions)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-definitions.template
|
||||
/*---
|
||||
description: String literal names (multiple fields definitions)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: Computed property names (multiple stacked fields definitions through ASI)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: Computed property symbol names (multiple stacked fields definitions through ASI)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: Literal property names (multiple stacked fields definitions through ASI)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/private-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: static literal private names (multiple stacked fields definitions through ASI)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: Static Computed property names (multiple stacked fields definitions through ASI)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: Static computed property symbol names (multiple stacked fields definitions through ASI)
|
||||
esid: prod-FieldDefinition
|
||||
|
@ -25,7 +25,7 @@ var y = Symbol();
|
|||
|
||||
|
||||
var C = class {
|
||||
[x]; [y] = 42
|
||||
static [x]; static [y] = 42
|
||||
foo = "foobar"
|
||||
bar = "barbaz";
|
||||
|
||||
|
@ -56,9 +56,9 @@ verifyProperty(c, "bar", {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, x), false);
|
||||
|
||||
verifyProperty(c, x, {
|
||||
verifyProperty(C, x, {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
@ -66,9 +66,9 @@ verifyProperty(c, x, {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, y), false);
|
||||
|
||||
verifyProperty(c, y, {
|
||||
verifyProperty(C, y, {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: Static literal property names (multiple stacked fields definitions through ASI)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: literal private names (multiple stacked fields definitions through ASI)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-multiple-stacked-definitions.template
|
||||
// - src/class-fields/productions/cls-expr-multiple-stacked-definitions.template
|
||||
/*---
|
||||
description: String literal names (multiple stacked fields definitions through ASI)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-new-no-sc-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template
|
||||
/*---
|
||||
description: Computed property names (field definitions followed by a method in a new line without a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-new-no-sc-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions followed by a method in a new line without a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-new-no-sc-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template
|
||||
/*---
|
||||
description: Literal property names (field definitions followed by a method in a new line without a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/private-names.case
|
||||
// - src/class-fields/default/cls-expr-new-no-sc-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template
|
||||
/*---
|
||||
description: static literal private names (field definitions followed by a method in a new line without a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-new-no-sc-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template
|
||||
/*---
|
||||
description: Static Computed property names (field definitions followed by a method in a new line without a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-new-no-sc-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template
|
||||
/*---
|
||||
description: Static computed property symbol names (field definitions followed by a method in a new line without a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
@ -25,7 +25,7 @@ var y = Symbol();
|
|||
|
||||
|
||||
var C = class {
|
||||
[x]; [y] = 42
|
||||
static [x]; static [y] = 42
|
||||
m() { return 42; }
|
||||
|
||||
}
|
||||
|
@ -43,9 +43,9 @@ verifyProperty(C.prototype, "m", {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, x), false);
|
||||
|
||||
verifyProperty(c, x, {
|
||||
verifyProperty(C, x, {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
@ -53,9 +53,9 @@ verifyProperty(c, x, {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, y), false);
|
||||
|
||||
verifyProperty(c, y, {
|
||||
verifyProperty(C, y, {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-new-no-sc-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template
|
||||
/*---
|
||||
description: Static literal property names (field definitions followed by a method in a new line without a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-names.case
|
||||
// - src/class-fields/default/cls-expr-new-no-sc-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template
|
||||
/*---
|
||||
description: literal private names (field definitions followed by a method in a new line without a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-new-no-sc-line-method.template
|
||||
// - src/class-fields/productions/cls-expr-new-no-sc-line-method.template
|
||||
/*---
|
||||
description: String literal names (field definitions followed by a method in a new line without a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-generator.template
|
||||
// - src/class-fields/productions/cls-expr-new-sc-line-generator.template
|
||||
/*---
|
||||
description: Computed property names (field definitions followed by a method in a new line with a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-generator.template
|
||||
// - src/class-fields/productions/cls-expr-new-sc-line-generator.template
|
||||
/*---
|
||||
description: Computed property symbol names (field definitions followed by a method in a new line with a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/literal-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-generator.template
|
||||
// - src/class-fields/productions/cls-expr-new-sc-line-generator.template
|
||||
/*---
|
||||
description: Literal property names (field definitions followed by a method in a new line with a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/private-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-generator.template
|
||||
// - src/class-fields/productions/cls-expr-new-sc-line-generator.template
|
||||
/*---
|
||||
description: static literal private names (field definitions followed by a method in a new line with a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-generator.template
|
||||
// - src/class-fields/productions/cls-expr-new-sc-line-generator.template
|
||||
/*---
|
||||
description: Static Computed property names (field definitions followed by a method in a new line with a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-computed-symbol-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-generator.template
|
||||
// - src/class-fields/productions/cls-expr-new-sc-line-generator.template
|
||||
/*---
|
||||
description: Static computed property symbol names (field definitions followed by a method in a new line with a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
@ -25,7 +25,7 @@ var y = Symbol();
|
|||
|
||||
|
||||
var C = class {
|
||||
[x]; [y] = 42;
|
||||
static [x]; static [y] = 42;
|
||||
*m() { return 42; }
|
||||
|
||||
}
|
||||
|
@ -43,9 +43,9 @@ verifyProperty(C.prototype, "m", {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, x), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, x), false);
|
||||
|
||||
verifyProperty(c, x, {
|
||||
verifyProperty(C, x, {
|
||||
value: undefined,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
@ -53,9 +53,9 @@ verifyProperty(c, x, {
|
|||
});
|
||||
|
||||
assert.sameValue(Object.hasOwnProperty.call(C.prototype, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(C, y), false);
|
||||
assert.sameValue(Object.hasOwnProperty.call(c, y), false);
|
||||
|
||||
verifyProperty(c, y, {
|
||||
verifyProperty(C, y, {
|
||||
value: 42,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-generator.template
|
||||
// - src/class-fields/productions/cls-expr-new-sc-line-generator.template
|
||||
/*---
|
||||
description: Static literal property names (field definitions followed by a method in a new line with a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/static-private-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-generator.template
|
||||
// - src/class-fields/productions/cls-expr-new-sc-line-generator.template
|
||||
/*---
|
||||
description: literal private names (field definitions followed by a method in a new line with a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-fields/string-literal-names.case
|
||||
// - src/class-fields/default/cls-expr-new-sc-line-generator.template
|
||||
// - src/class-fields/productions/cls-expr-new-sc-line-generator.template
|
||||
/*---
|
||||
description: String literal names (field definitions followed by a method in a new line with a semicolon)
|
||||
esid: prod-FieldDefinition
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue