summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/computed-property-names/class/accessor/setter.js
blob: 0d1c0cc42bfd1566fdfcb1ba2b5ed33c68536990 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright (C) 2014 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 12.2.5
description: >
    Computed property names for setters
---*/
var calls = 0;
class C {
  set ['a'](_) {
    calls++;
  }
}
new C().a = 'A';
assert.sameValue(calls, 1, "The value of `calls` is `1`, after executing `new C().a = 'A';`");

reportCompare(0, 0);