in-static-setter.js (635B)
1 // Copyright (C) 2014 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-makesuperpropertyreference 5 description: > 6 class super in static setter 7 ---*/ 8 class B { 9 static method() { 10 return 1; 11 } 12 static get x() { 13 return 2; 14 } 15 } 16 class C extends B { 17 static set x(v) { 18 assert.sameValue(v, 3, "The value of `v` is `3`"); 19 assert.sameValue(super.x, 2, "The value of `super.x` is `2`"); 20 assert.sameValue(super.method(), 1, "`super.method()` returns `1`"); 21 } 22 } 23 assert.sameValue(C.x = 3, 3, "`C.x = 3` is `3`"); 24 25 reportCompare(0, 0);