Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/src/class-fields/productions/cls-decl-new-no-sc-line-method.template

raw
1 // Copyright (C) 2017 the V8 project authors, 2017 Igalia S.L. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 path: language/statements/class/fields-new-no-sc-line-method-
6 name: field definitions followed by a method in a new line without a semicolon
7 features: [class, class-fields-public]
8 esid: prod-FieldDefinition
9 includes: [propertyHelper.js]
10 ---*/
11
12 class C {
13 /*{ fields }*/
14 m() { return 42; }
15 /*{ privateinspectionfunctions }*/
16 }
17
18 var c = new C();
19
20 assert.sameValue(c.m(), 42);
21 assert.sameValue(c.m, C.prototype.m);
22 assert.sameValue(Object.hasOwnProperty.call(c, "m"), false);
23
24 verifyProperty(C.prototype, "m", {
25 enumerable: false,
26 configurable: true,
27 writable: true,
28 });
29
30 /*{ assertions }*/