[JS IR BE] Fixup property accessors
This commit is contained in:
+8
@@ -154,6 +154,14 @@ class PrivateMembersLowering(val context: JsIrBackendContext) : ClassLoweringPas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Detach old function from corresponding property
|
||||||
|
val correspondingProperty = function.correspondingPropertySymbol?.owner
|
||||||
|
if (correspondingProperty != null) {
|
||||||
|
when (function) {
|
||||||
|
correspondingProperty.getter -> correspondingProperty.getter = staticFunction
|
||||||
|
correspondingProperty.setter -> correspondingProperty.setter = staticFunction
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
staticFunction.typeParameters += function.typeParameters.map { it.deepCopyWithSymbols(staticFunction) }
|
staticFunction.typeParameters += function.typeParameters.map { it.deepCopyWithSymbols(staticFunction) }
|
||||||
|
|
||||||
|
|||||||
+1
@@ -200,6 +200,7 @@ class ThrowableSuccessorsLowering(val context: JsIrBackendContext) : FileLowerin
|
|||||||
val function = JsIrBuilder.buildFunction(name, fakeAccessor.returnType, fakeAccessor.parent).apply {
|
val function = JsIrBuilder.buildFunction(name, fakeAccessor.returnType, fakeAccessor.parent).apply {
|
||||||
overriddenSymbols += fakeAccessor.overriddenSymbols
|
overriddenSymbols += fakeAccessor.overriddenSymbols
|
||||||
correspondingPropertySymbol = fakeAccessor.correspondingPropertySymbol
|
correspondingPropertySymbol = fakeAccessor.correspondingPropertySymbol
|
||||||
|
correspondingPropertySymbol!!.owner.getter = this
|
||||||
dispatchReceiverParameter = fakeAccessor.dispatchReceiverParameter?.copyTo(this)
|
dispatchReceiverParameter = fakeAccessor.dispatchReceiverParameter?.copyTo(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user