mirror of
https://github.com/tc39/test262.git
synced 2025-05-29 03:00:31 +02:00
29 lines
682 B
Plaintext
29 lines
682 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-new-sc-line-method-
|
|
name: field definitions followed by a method in a new line with a semicolon
|
|
features: [class-fields]
|
|
esid: prod-FieldDefinition
|
|
---*/
|
|
|
|
var C = class {
|
|
/*{ fields }*/;
|
|
m() { return 42; }
|
|
}
|
|
|
|
var c = new C();
|
|
|
|
assert.sameValue(c.m(), 42);
|
|
assert.sameValue(c.m, C.prototype.m);
|
|
assert.sameValue(Object.hasOwnProperty.call(c, "m"), false);
|
|
|
|
verifyProperty(C.prototype, "m", {
|
|
enumerable: false,
|
|
configurable: true,
|
|
writable: true,
|
|
});
|
|
|
|
/*{ assertions }*/
|