[JS IR BE] Visit callable reference members in private member lowering
This commit is contained in:
+7
-1
@@ -62,7 +62,10 @@ class PrivateMembersLowering(val context: JsIrBackendContext) : ClassLoweringPas
|
|||||||
} ?: expression
|
} ?: expression
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun visitFunctionReference(expression: IrFunctionReference) = memberMap[expression.symbol]?.let {
|
override fun visitFunctionReference(expression: IrFunctionReference): IrExpression {
|
||||||
|
super.visitFunctionReference(expression)
|
||||||
|
|
||||||
|
return memberMap[expression.symbol]?.let {
|
||||||
transformPrivateToStaticReference(expression) {
|
transformPrivateToStaticReference(expression) {
|
||||||
IrFunctionReferenceImpl(
|
IrFunctionReferenceImpl(
|
||||||
expression.startOffset, expression.endOffset,
|
expression.startOffset, expression.endOffset,
|
||||||
@@ -73,8 +76,11 @@ class PrivateMembersLowering(val context: JsIrBackendContext) : ClassLoweringPas
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
} ?: expression
|
} ?: expression
|
||||||
|
}
|
||||||
|
|
||||||
override fun visitPropertyReference(expression: IrPropertyReference): IrExpression {
|
override fun visitPropertyReference(expression: IrPropertyReference): IrExpression {
|
||||||
|
super.visitPropertyReference(expression)
|
||||||
|
|
||||||
return if (expression.getter in memberMap || expression.setter in memberMap) {
|
return if (expression.getter in memberMap || expression.setter in memberMap) {
|
||||||
transformPrivateToStaticReference(expression) {
|
transformPrivateToStaticReference(expression) {
|
||||||
IrPropertyReferenceImpl(
|
IrPropertyReferenceImpl(
|
||||||
|
|||||||
Reference in New Issue
Block a user