K2: drop state mutation from ResolvedLambdaAtom init block
Related to KT-61933
This commit is contained in:
committed by
Space Team
parent
770bbd8f6b
commit
eb3f785c36
+3
-2
@@ -117,7 +117,8 @@ fun extractLambdaInfoFromFunctionType(
|
|||||||
parameters,
|
parameters,
|
||||||
returnType,
|
returnType,
|
||||||
typeVariableForLambdaReturnType = returnTypeVariable,
|
typeVariableForLambdaReturnType = returnTypeVariable,
|
||||||
candidate,
|
|
||||||
coerceFirstParameterToExtensionReceiver
|
coerceFirstParameterToExtensionReceiver
|
||||||
)
|
).also {
|
||||||
|
candidate?.postponedAtoms?.add(it)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -145,7 +145,8 @@ private fun extractLambdaInfo(
|
|||||||
parameters,
|
parameters,
|
||||||
returnType,
|
returnType,
|
||||||
typeVariable.takeIf { newTypeVariableUsed },
|
typeVariable.takeIf { newTypeVariableUsed },
|
||||||
candidate,
|
|
||||||
coerceFirstParameterToExtensionReceiver = false
|
coerceFirstParameterToExtensionReceiver = false
|
||||||
)
|
).also {
|
||||||
|
candidate?.postponedAtoms?.add(it)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,14 +46,8 @@ class ResolvedLambdaAtom(
|
|||||||
val parameters: List<ConeKotlinType>,
|
val parameters: List<ConeKotlinType>,
|
||||||
var returnType: ConeKotlinType,
|
var returnType: ConeKotlinType,
|
||||||
typeVariableForLambdaReturnType: ConeTypeVariableForLambdaReturnType?,
|
typeVariableForLambdaReturnType: ConeTypeVariableForLambdaReturnType?,
|
||||||
candidateOfOuterCall: Candidate?,
|
|
||||||
val coerceFirstParameterToExtensionReceiver: Boolean
|
val coerceFirstParameterToExtensionReceiver: Boolean
|
||||||
) : PostponedResolvedAtom() {
|
) : PostponedResolvedAtom() {
|
||||||
init {
|
|
||||||
candidateOfOuterCall?.let {
|
|
||||||
it.postponedAtoms += this
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var typeVariableForLambdaReturnType = typeVariableForLambdaReturnType
|
var typeVariableForLambdaReturnType = typeVariableForLambdaReturnType
|
||||||
private set
|
private set
|
||||||
|
|||||||
Reference in New Issue
Block a user