blob: 52a268b2826efaf86e723c25a9106f4dde17e73d (
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
|
// Copyright (C) 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/arguments-object/cls-decl-gen-meth-static-
name: class declaration generator method
esid: sec-arguments-exotic-objects
info: |
9.4.4 Arguments Exotic Objects
Most ECMAScript functions make an arguments object available to their code. Depending upon the
characteristics of the function definition, its arguments object is either an ordinary object
or an arguments exotic object.
features: [generators]
---*/
var callCount = 0;
class C {
static *method() {
/*{ body }*/
callCount = callCount + 1;
}
}
C.method(/*{ args }*/).next();
// Stores a reference `ref` for case evaluation
var ref = C.method;
assert.sameValue(callCount, 1, 'method invoked exactly once');
|