mirror of
https://github.com/tc39/test262.git
synced 2025-10-28 18:24:01 +01:00
34 lines
905 B
Plaintext
34 lines
905 B
Plaintext
// Copyright (C) 2017 the V8 project authors, 2017 Igalia S.L. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
path: language/statements/class/fields-after-same-line-static-async-gen-
|
|
name: field definitions after a static async generator in the same line
|
|
features: [class-fields, async-iteration]
|
|
flags: [async]
|
|
esid: prod-FieldDefinition
|
|
---*/
|
|
|
|
class C {
|
|
static async *m() { return 42; } /*{ fields }*/;
|
|
/*{ privateinspectionfunctions }*/
|
|
}
|
|
|
|
var c = new C();
|
|
|
|
assert.sameValue(Object.hasOwnProperty.call(c, "m"), false);
|
|
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false);
|
|
|
|
verifyProperty(C, "m", {
|
|
enumerable: false,
|
|
configurable: true,
|
|
writable: true,
|
|
}, {restore: true});
|
|
|
|
/*{ assertions }*/
|
|
|
|
C.m().next().then(function(v) {
|
|
assert.sameValue(v.value, 42);
|
|
assert.sameValue(v.done, true);
|
|
}, $DONE).then($DONE, $DONE);
|