Debian Codegraph @

js/src/tests/test262/language/statements/class/elements/fields-asi-1.js

raw
1 // Copyright (C) 2017 Valerie Young. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 description: ASI test in field declarations -- computed name interpreted as property
6 esid: sec-automatic-semicolon-insertion
7 features: [class, class-fields-public]
8 ---*/
9
10 var obj = {}
11 class C {
12 x = obj
13 ['lol'] = 42
14 }
15
16 var c = new C();
17
18 assert.sameValue(c.x, 42);
19 assert.sameValue(obj['lol'], 42);
20
21 reportCompare(0, 0);