mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
14 lines
181 B
JavaScript
14 lines
181 B
JavaScript
function test(x) {
|
|
class F {
|
|
[x] = 1;
|
|
constructor() {}
|
|
}
|
|
|
|
x = 'deadbeef';
|
|
expect(new F().foo).toBe(1);
|
|
x = 'wrong';
|
|
expect(new F().foo).toBe(1);
|
|
}
|
|
|
|
test('foo');
|