summaryrefslogtreecommitdiff
path: root/src/class-fields/default/cls-decl-after-same-line-static-async-gen.template
diff options
context:
space:
mode:
Diffstat (limited to 'src/class-fields/default/cls-decl-after-same-line-static-async-gen.template')
-rw-r--r--src/class-fields/default/cls-decl-after-same-line-static-async-gen.template30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/class-fields/default/cls-decl-after-same-line-static-async-gen.template b/src/class-fields/default/cls-decl-after-same-line-static-async-gen.template
new file mode 100644
index 000000000..5d5ad3f3e
--- /dev/null
+++ b/src/class-fields/default/cls-decl-after-same-line-static-async-gen.template
@@ -0,0 +1,30 @@
+// 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]
+---*/
+
+class C {
+ static async *m() { return 42; } /*{ fields }*/;
+}
+
+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,
+});
+
+/*{ assertions }*/
+
+C.m().next().then(function(v) {
+ assert.sameValue(v, 42);
+}, $DONE).then($DONE, $DONE);