Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/src/class-fields/productions/cls-decl-after-same-line-static-async-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-after-same-line-static-async-method-
6 name: field definitions after a static async method in the same line
7 features: [class, class-fields-public, async-functions]
8 flags: [async]
9 esid: prod-FieldDefinition
10 includes: [propertyHelper.js]
11 ---*/
12
13 class C {
14 static async m() { return 42; } /*{ fields }*/;
15 /*{ privateinspectionfunctions }*/
16 }
17
18 var c = new C();
19
20 assert.sameValue(Object.hasOwnProperty.call(c, "m"), false);
21 assert.sameValue(Object.hasOwnProperty.call(C.prototype, "m"), false);
22
23 verifyProperty(C, "m", {
24 enumerable: false,
25 configurable: true,
26 writable: true,
27 }, {restore: true});
28
29 /*{ assertions }*/
30
31 C.m().then(function(v) {
32 assert.sameValue(v, 42);
33 }, $DONE).then($DONE, $DONE);