FIR: Minor. Formatting
This commit is contained in:
+7
-4
@@ -221,14 +221,16 @@ class TowerResolveManager internal constructor(private val towerResolver: FirTow
|
|||||||
|
|
||||||
private fun processInvokeReceiversCandidates(invokeBuiltinExtensionMode: Boolean) {
|
private fun processInvokeReceiversCandidates(invokeBuiltinExtensionMode: Boolean) {
|
||||||
for (invokeReceiverCandidate in invokeReceiverCollector.bestCandidates()) {
|
for (invokeReceiverCandidate in invokeReceiverCollector.bestCandidates()) {
|
||||||
|
|
||||||
val symbol = invokeReceiverCandidate.symbol
|
val symbol = invokeReceiverCandidate.symbol
|
||||||
if (symbol !is FirCallableSymbol<*> && symbol !is FirRegularClassSymbol) continue
|
if (symbol !is FirCallableSymbol<*> && symbol !is FirRegularClassSymbol) continue
|
||||||
|
|
||||||
val isExtensionFunctionType =
|
val isExtensionFunctionType =
|
||||||
(symbol as? FirCallableSymbol<*>)?.fir?.returnTypeRef?.isExtensionFunctionType(towerResolver.components.session) == true
|
(symbol as? FirCallableSymbol<*>)?.fir?.returnTypeRef?.isExtensionFunctionType(towerResolver.components.session) == true
|
||||||
|
|
||||||
if (invokeBuiltinExtensionMode && !isExtensionFunctionType) {
|
if (invokeBuiltinExtensionMode && !isExtensionFunctionType) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
val extensionReceiverExpression = invokeReceiverCandidate.extensionReceiverExpression()
|
val extensionReceiverExpression = invokeReceiverCandidate.extensionReceiverExpression()
|
||||||
val useImplicitReceiverAsBuiltinInvokeArgument =
|
val useImplicitReceiverAsBuiltinInvokeArgument =
|
||||||
!invokeBuiltinExtensionMode && isExtensionFunctionType &&
|
!invokeBuiltinExtensionMode && isExtensionFunctionType &&
|
||||||
@@ -335,7 +337,10 @@ class TowerResolveManager internal constructor(private val towerResolver: FirTow
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data class SuspendedResolverTask(val continuation: Continuation<Unit>, val group: TowerGroup): Comparable<SuspendedResolverTask> {
|
private data class SuspendedResolverTask(
|
||||||
|
val continuation: Continuation<Unit>,
|
||||||
|
val group: TowerGroup
|
||||||
|
) : Comparable<SuspendedResolverTask> {
|
||||||
override fun compareTo(other: SuspendedResolverTask): Int {
|
override fun compareTo(other: SuspendedResolverTask): Int {
|
||||||
return group.compareTo(other.group)
|
return group.compareTo(other.group)
|
||||||
}
|
}
|
||||||
@@ -362,10 +367,8 @@ class TowerResolveManager internal constructor(private val towerResolver: FirTow
|
|||||||
if (resultCollector.isSuccess()) return
|
if (resultCollector.isSuccess()) return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
enum class InvokeResolveMode {
|
enum class InvokeResolveMode {
|
||||||
IMPLICIT_CALL_ON_GIVEN_RECEIVER,
|
IMPLICIT_CALL_ON_GIVEN_RECEIVER,
|
||||||
RECEIVER_FOR_INVOKE_BUILTIN_EXTENSION
|
RECEIVER_FOR_INVOKE_BUILTIN_EXTENSION
|
||||||
|
|||||||
Reference in New Issue
Block a user