summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/class/elements/static-as-valid-instance-field-assigned.js
blob: 208b48a8dbbf7635692a6f5fa0e17c0c48e439d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// This file was procedurally generated from the following sources:
// - src/class-elements/static-as-valid-instance-field-assigned.case
// - src/class-elements/default/cls-expr.template
/*---
description: static is a valid name of an instance field (field definitions in a class expression)
esid: prod-FieldDefinition
features: [class-fields-public, class]
flags: [generated]
includes: [propertyHelper.js]
info: |
    ClassElement:
      ...
      FieldDefinition ;

    FieldDefinition:
      ClassElementName Initializer_opt

    ClassElementName:
      PropertyName

---*/


var C = class {
  static = "foo";
}

let c = new C();

verifyProperty(c, "static", {
  value: "foo",
  enumerable: true,
  writable: true,
  configurable: true
});


reportCompare(0, 0);