Debian Codegraph @

js/src/tests/test262/language/statements/class/syntax/class-declaration-binding-identifier-class-element-list.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 14.5
5 description: >
6 ClassDeclaration:
7 class BindingIdentifier ClassTail
8
9 ClassTail:
10 ... { ClassBodyopt }
11
12 ClassBody[Yield] :
13 ClassElementList[?Yield]
14
15
16 ClassElementList[Yield] :
17 ClassElement[?Yield]
18 ClassElementList[?Yield] ClassElement[?Yield]
19
20 ClassElement[Yield] :
21 MethodDefinition[?Yield]
22 static MethodDefinition[?Yield]
23 ;
24
25
26 ---*/
27 class A {
28 method() {}
29 static method() {}
30 ;
31 }
32
33 assert.sameValue(typeof A, "function");
34 assert.sameValue(typeof A.prototype.method, "function");
35 assert.sameValue(typeof A.method, "function");
36
37 reportCompare(0, 0);