[FIR] Don't set dispatch receiver type for local functions
This commit is contained in:
committed by
Space Team
parent
6bb7fc05df
commit
e66fac3d5f
+1
-1
@@ -1728,7 +1728,7 @@ class LightTreeRawFirDeclarationBuilder(
|
|||||||
}
|
}
|
||||||
|
|
||||||
symbol = functionSymbol
|
symbol = functionSymbol
|
||||||
dispatchReceiverType = currentDispatchReceiverType()
|
dispatchReceiverType = runIf(!isLocal) { currentDispatchReceiverType() }
|
||||||
contextReceivers.addAll(convertContextReceivers(functionDeclaration))
|
contextReceivers.addAll(convertContextReceivers(functionDeclaration))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1507,7 +1507,7 @@ open class PsiRawFirBuilder(
|
|||||||
name = function.nameAsSafeName
|
name = function.nameAsSafeName
|
||||||
labelName = context.getLastLabel(function)?.name ?: runIf(!name.isSpecial) { name.identifier }
|
labelName = context.getLastLabel(function)?.name ?: runIf(!name.isSpecial) { name.identifier }
|
||||||
symbol = FirNamedFunctionSymbol(callableIdForName(function.nameAsSafeName)).also { functionSymbol = it }
|
symbol = FirNamedFunctionSymbol(callableIdForName(function.nameAsSafeName)).also { functionSymbol = it }
|
||||||
dispatchReceiverType = currentDispatchReceiverType()
|
dispatchReceiverType = runIf(!isLocalFunction) { currentDispatchReceiverType() }
|
||||||
status = FirDeclarationStatusImpl(
|
status = FirDeclarationStatusImpl(
|
||||||
if (isLocalFunction) Visibilities.Local else function.visibility,
|
if (isLocalFunction) Visibilities.Local else function.visibility,
|
||||||
function.modality,
|
function.modality,
|
||||||
|
|||||||
Reference in New Issue
Block a user