Debian Codegraph @

packages/babel-plugin-proposal-class-properties/test/fixtures/assumption-setPublicClassFields/instance-computed/output.js

raw
1 function test(x) {
2 let _x;
3 _x = x;
4 class F {
5 constructor() {
6 this[_x] = 1;
7 }
8 }
9 x = 'deadbeef';
10 expect(new F().foo).toBe(1);
11 x = 'wrong';
12 expect(new F().foo).toBe(1);
13 }
14 test('foo');