Debian Codegraph @

js/src/tests/test262/language/statements/class/static-init-super-property.js

raw
1 // Copyright (C) 2021 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-runtime-semantics-classstaticblockdefinitionevaluation
5 description: The home object for a class static initialization block is the parent class
6 info: |
7 ClassStaticBlock : static { ClassStaticBlockBody }
8
9 [...]
10 4. Perform MakeMethod(body, homeObject).
11 features: [class-static-block]
12 ---*/
13
14 function Parent() {}
15 Parent.test262 = 'test262';
16 var value;
17
18 class C extends Parent {
19 static {
20 value = super.test262;
21 }
22 }
23
24 assert.sameValue(value, 'test262');
25
26 reportCompare(0, 0);