mirror of
https://github.com/tc39/test262.git
synced 2025-10-28 18:24:01 +01:00
29 lines
725 B
Plaintext
29 lines
725 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/expressions/class/fields-after-same-line-gen-
|
|
name: field definitions after a generator in the same line
|
|
features: [generators, class-fields]
|
|
esid: prod-FieldDefinition
|
|
---*/
|
|
|
|
var C = class {
|
|
*m() { return 42; } /*{ fields }*/;
|
|
/*{ privateinspectionfunctions }*/
|
|
}
|
|
|
|
var c = new C();
|
|
|
|
assert.sameValue(c.m().next().value, 42);
|
|
assert.sameValue(Object.hasOwnProperty.call(c, "m"), false);
|
|
assert.sameValue(c.m, C.prototype.m);
|
|
|
|
verifyProperty(C.prototype, "m", {
|
|
enumerable: false,
|
|
configurable: true,
|
|
writable: true,
|
|
});
|
|
|
|
/*{ assertions }*/
|