[FIR] Don't set dispatch receiver type for local functions

This commit is contained in:
Dmitriy Novozhilov
2023-06-22 13:55:58 +03:00
committed by Space Team
parent 6bb7fc05df
commit e66fac3d5f
2 changed files with 2 additions and 2 deletions
@@ -1728,7 +1728,7 @@ class LightTreeRawFirDeclarationBuilder(
}
symbol = functionSymbol
dispatchReceiverType = currentDispatchReceiverType()
dispatchReceiverType = runIf(!isLocal) { currentDispatchReceiverType() }
contextReceivers.addAll(convertContextReceivers(functionDeclaration))
}
}
@@ -1507,7 +1507,7 @@ open class PsiRawFirBuilder(
name = function.nameAsSafeName
labelName = context.getLastLabel(function)?.name ?: runIf(!name.isSpecial) { name.identifier }
symbol = FirNamedFunctionSymbol(callableIdForName(function.nameAsSafeName)).also { functionSymbol = it }
dispatchReceiverType = currentDispatchReceiverType()
dispatchReceiverType = runIf(!isLocalFunction) { currentDispatchReceiverType() }
status = FirDeclarationStatusImpl(
if (isLocalFunction) Visibilities.Local else function.visibility,
function.modality,