summaryrefslogtreecommitdiff
path: root/src/class-fields/zero-initializer-var-generator-empty-function.case
blob: 688d24e60131749b6f078f259487dd8ac971b227 (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
// Copyright (C) 2016 the V8 project authors, 2017 Igalia S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
desc: zero initialized var, generator empty function
info: |
  1.1 New Productions

  [...]

  FieldDefinitionList [Yield, Await]:
    FieldDefinition [?Yield, ?Await]
    FieldDefinitionList  [?Yield, ?Await], FieldDefinition [?Yield, ?Await]
template: default
includes: [propertyHelper.js]
---*/

//- body
  a = 0; *b(){}

//- assertions
  assert.sameValue(this.a, 0);
  verifyEnumerable(this, "a");
  verifyWritable(this, "a");
  verifyConfigurable(this, "a");

  assert.sameValue(typeof Object.getPrototypeOf(this).b, "function");
  verifyNotEnumerable(Object.getPrototypeOf(this), "b");
  verifyConfigurable(Object.getPrototypeOf(this), "b");