K2: drop state mutation from LambdaWithTypeVariableAsExpectedTypeAtom init block
Related to KT-61933
This commit is contained in:
committed by
Space Team
parent
14bc20652e
commit
770bbd8f6b
+3
-1
@@ -42,7 +42,9 @@ fun Candidate.preprocessLambdaArgument(
|
||||
}?.type as ConeKotlinType?
|
||||
|
||||
if (explicitTypeArgument == null || explicitTypeArgument.typeArguments.isNotEmpty()) {
|
||||
return LambdaWithTypeVariableAsExpectedTypeAtom(argument, expectedType, this)
|
||||
return LambdaWithTypeVariableAsExpectedTypeAtom(argument, expectedType, this).also {
|
||||
this.postponedAtoms += it
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,9 +90,6 @@ class LambdaWithTypeVariableAsExpectedTypeAtom(
|
||||
private val initialExpectedTypeType: ConeKotlinType,
|
||||
val candidateOfOuterCall: Candidate,
|
||||
) : PostponedResolvedAtom(), LambdaWithTypeVariableAsExpectedTypeMarker {
|
||||
init {
|
||||
candidateOfOuterCall.postponedAtoms += this
|
||||
}
|
||||
|
||||
override var parameterTypesFromDeclaration: List<ConeKotlinType?>? = null
|
||||
private set
|
||||
|
||||
Reference in New Issue
Block a user