class-declaration-computed-method-definition.js (656B)
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 ... 23 24 ---*/ 25 class A { 26 [1]() {} 27 } 28 29 assert.sameValue(typeof A, "function"); 30 assert.sameValue(typeof A.prototype[1], "function"); 31 32 reportCompare(0, 0);