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