Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed Feb 16, 2024
1 parent 1e5789a commit 2af8f96
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 10 deletions.
Expand Up @@ -19,7 +19,7 @@ function captureInitializerThis(callback) {
@dec
class Foo {
@(captureInitializerThis(v => accessorThis = v))
static accessor;
static accessor accessor;
@(captureInitializerThis(v => getterThis = v))
static get getter() {};
@(captureInitializerThis(v => setterThis = v))
Expand Down
Expand Up @@ -19,7 +19,7 @@ function captureInitializerThis(callback) {
@dec
class Foo {
@(captureInitializerThis(v => accessorThis = v))
static accessor;
static accessor accessor;
@(captureInitializerThis(v => getterThis = v))
static get getter() {};
@(captureInitializerThis(v => setterThis = v))
Expand Down
@@ -1,4 +1,4 @@
var _initStatic, _initClass, _accessorDecs, _init_accessor, _init_extra_accessor, _getterDecs, _setterDecs, _methodDecs, _propertyDecs, _init_property, _init_extra_property, _temp;
var _initStatic, _initClass, _accessorDecs, _init_accessor, _init_extra_accessor, _getterDecs, _setterDecs, _methodDecs, _propertyDecs, _init_property, _init_extra_property, _A, _temp;
let original, replaced, accessorThis, getterThis, setterThis, methodThis, propertyThis;
function dec(Klass) {
original = Klass;
Expand All @@ -18,14 +18,20 @@ _setterDecs = captureInitializerThis(v => setterThis = v);
_methodDecs = captureInitializerThis(v => methodThis = v);
_propertyDecs = captureInitializerThis(v => propertyThis = v);
let _Foo;
new (_temp = class extends babelHelpers.identity {
new (_A = /*#__PURE__*/new WeakMap(), (_temp = class extends babelHelpers.identity {
constructor() {
(super(_Foo), babelHelpers.defineProperty(this, "accessor", _init_accessor()), babelHelpers.defineProperty(this, "property", (_init_extra_accessor(), _init_property()))), (() => {
(super(_Foo), babelHelpers.classPrivateFieldInitSpec(this, _A, _init_accessor()), babelHelpers.defineProperty(this, "property", (_init_extra_accessor(), _init_property()))), (() => {
_init_extra_property();
})(), _initClass();
}
}, (_Foo2 => {
class Foo {
static get accessor() {
return babelHelpers.classPrivateFieldGet2(Foo, _A);
}
static set accessor(v) {
babelHelpers.classPrivateFieldSet2(Foo, _A, v);
}
static get getter() {}
static set setter(_) {}
static method() {}
Expand All @@ -35,7 +41,7 @@ new (_temp = class extends babelHelpers.identity {
({
e: [_init_accessor, _init_extra_accessor, _init_property, _init_extra_property, _initStatic],
c: [_Foo, _initClass]
} = babelHelpers.applyDecs2311(_Foo2, [[_getterDecs, 11, "getter"], [_setterDecs, 12, "setter"], [_methodDecs, 10, "method"], [_accessorDecs, 8, "accessor"], [_propertyDecs, 8, "property"]], [dec]));
} = babelHelpers.applyDecs2311(_Foo2, [[_accessorDecs, 9, "accessor"], [_getterDecs, 11, "getter"], [_setterDecs, 12, "setter"], [_methodDecs, 10, "method"], [_propertyDecs, 8, "property"]], [dec]));
_initStatic(_Foo2);
})();
})(), _temp)();
})(), _temp))();
Expand Up @@ -19,7 +19,7 @@ function captureInitializerThis(callback) {
@dec
class Foo {
@(captureInitializerThis(v => accessorThis = v))
static accessor;
static accessor accessor;
@(captureInitializerThis(v => getterThis = v))
static get getter() {};
@(captureInitializerThis(v => setterThis = v))
Expand Down
Expand Up @@ -25,15 +25,21 @@ new class extends babelHelpers.identity {
({
e: [_init_accessor, _init_extra_accessor, _init_property, _init_extra_property, _initStatic],
c: [_Foo, _initClass]
} = babelHelpers.applyDecs2311(this, [[_getterDecs, 11, "getter"], [_setterDecs, 12, "setter"], [_methodDecs, 10, "method"], [_accessorDecs, 8, "accessor"], [_propertyDecs, 8, "property"]], [dec]));
} = babelHelpers.applyDecs2311(this, [[_accessorDecs, 9, "accessor"], [_getterDecs, 11, "getter"], [_setterDecs, 12, "setter"], [_methodDecs, 10, "method"], [_propertyDecs, 8, "property"]], [dec]));
_initStatic(this);
}
static get accessor() {
return Foo.#A;
}
static set accessor(v) {
Foo.#A = v;
}
static get getter() {}
static set setter(_) {}
static method() {}
}
}
accessor = _init_accessor();
#A = _init_accessor();
property = (_init_extra_accessor(), _init_property());
constructor() {
super(_Foo), (() => {
Expand Down

0 comments on commit 2af8f96

Please sign in to comment.