call-expr-value.js (653B)
1 // Copyright (C) 2016 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 esid: sec-super-keyword 5 es6id: 12.3.5 6 description: Evaluates to the new "this" value 7 info: | 8 [...] 9 6. Let result be ? Construct(func, argList, newTarget). 10 7. Let thisER be GetThisEnvironment( ). 11 8. Return ? thisER.BindThisValue(result). 12 features: [class] 13 ---*/ 14 15 var customThisValue = {}; 16 var value; 17 function Parent() { 18 return customThisValue; 19 } 20 21 class Child extends Parent { 22 constructor() { 23 value = super(); 24 } 25 } 26 27 new Child(); 28 29 assert.sameValue(value, customThisValue); 30 31 reportCompare(0, 0);