Debian Codegraph @

js/src/tests/test262/language/statements/class/definition/getters-restricted-ids.js

raw
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 es6id: 14.5
5 description: >
6 class getters 2
7 ---*/
8 class C {
9 get eval() {
10 return 1;
11 }
12 get arguments() {
13 return 2;
14 }
15 static get eval() {
16 return 3;
17 }
18 static get arguments() {
19 return 4;
20 }
21 };
22
23 assert.sameValue(new C().eval, 1, "The value of `new C().eval` is `1`");
24 assert.sameValue(new C().arguments, 2, "The value of `new C().arguments` is `2`");
25 assert.sameValue(C.eval, 3, "The value of `C.eval` is `3`");
26 assert.sameValue(C.arguments, 4, "The value of `C.arguments` is `4`");
27
28 reportCompare(0, 0);