* fix: fix static private field shadowed by local variable currently throw an error, maybe we could generate correct code fix #12960 * feat: rename local variable and add test cases * feat: add unshadow to privateIn visitor also add test cases * test: add reference to shadowed variable * refactor: apply suggested changes simplify logic and add comments
19 lines
273 B
JavaScript
19 lines
273 B
JavaScript
class Test {
|
|
static method() {
|
|
const _Test2 = 2;
|
|
|
|
const func = () => {
|
|
const _Test = 3;
|
|
return babelHelpers.classStaticPrivateFieldSpecGet(this, Test, _x) + _Test;
|
|
};
|
|
|
|
return func() + _Test2;
|
|
}
|
|
|
|
}
|
|
|
|
var _x = {
|
|
writable: true,
|
|
value: 1
|
|
};
|