[IR] Fix calculation of receiver type for properies in expect/actual context

^KT-62926 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-12-07 13:21:57 +02:00
committed by Space Team
parent 9cef8a2133
commit 7d685522ce
22 changed files with 141 additions and 5 deletions
@@ -271,7 +271,11 @@ internal abstract class IrExpectActualMatchingContext(
get() = (asIr().parent as? IrClass)?.defaultType
override val CallableSymbolMarker.extensionReceiverType: IrType?
get() = safeAsIr<IrFunction>()?.extensionReceiverParameter?.type
get() = when (this) {
is IrFunctionSymbol -> owner.extensionReceiverParameter?.type
is IrPropertySymbol -> owner.getter?.extensionReceiverParameter?.type
else -> null
}
override val CallableSymbolMarker.extensionReceiverTypeRef: TypeRefMarker?
get() = extensionReceiverType