summaryrefslogtreecommitdiff
path: root/src/class-fields/default/cls-expr-after-same-line-static-method.template
diff options
context:
space:
mode:
Diffstat (limited to 'src/class-fields/default/cls-expr-after-same-line-static-method.template')
-rw-r--r--src/class-fields/default/cls-expr-after-same-line-static-method.template26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/class-fields/default/cls-expr-after-same-line-static-method.template b/src/class-fields/default/cls-expr-after-same-line-static-method.template
new file mode 100644
index 000000000..1512059bb
--- /dev/null
+++ b/src/class-fields/default/cls-expr-after-same-line-static-method.template
@@ -0,0 +1,26 @@
+// 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-static-method-
+name: field definitions after a static method in the same line
+features: [class-fields]
+---*/
+
+var C = class {
+ static m() { return 42; } /*{ fields }*/;
+}
+
+var c = new C();
+
+assert.sameValue(C.m(), 42);
+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 }*/