Initialize builder inference lambda anyway, even a call is inapplicable
^KT-47744 Fixed
This commit is contained in:
committed by
teamcityserver
parent
2b0ba6fa40
commit
357fda2efa
+4
@@ -88,6 +88,8 @@ class DelegatedPropertyInferenceSession(
|
||||
diagnosticsHolder: KotlinDiagnosticsHolder
|
||||
): Map<TypeConstructor, UnwrappedType> = emptyMap()
|
||||
|
||||
override fun initializeLambda(lambda: ResolvedLambdaAtom) {}
|
||||
|
||||
override fun writeOnlyStubs(callInfo: SingleCallResolutionResult): Boolean = false
|
||||
|
||||
override fun shouldCompleteResolvedSubAtomsOf(resolvedCallAtom: ResolvedCallAtom) = true
|
||||
@@ -124,4 +126,6 @@ class InferenceSessionForExistingCandidates(
|
||||
): ConstraintSystemCompletionMode? = null
|
||||
|
||||
override fun resolveReceiverIndependently(): Boolean = resolveReceiverIndependently
|
||||
|
||||
override fun initializeLambda(lambda: ResolvedLambdaAtom) {}
|
||||
}
|
||||
|
||||
+5
-1
@@ -223,13 +223,17 @@ class BuilderInferenceSession(
|
||||
return ComposedSubstitutor(currentSubstitutor, createNonFixedTypeToVariableSubstitutor())
|
||||
}
|
||||
|
||||
override fun initializeLambda(lambda: ResolvedLambdaAtom) {
|
||||
this.lambda = lambda
|
||||
}
|
||||
|
||||
override fun inferPostponedVariables(
|
||||
lambda: ResolvedLambdaAtom,
|
||||
initialStorage: ConstraintStorage,
|
||||
completionMode: ConstraintSystemCompletionMode,
|
||||
diagnosticsHolder: KotlinDiagnosticsHolder,
|
||||
): Map<TypeConstructor, UnwrappedType>? {
|
||||
this.lambda = lambda
|
||||
initializeLambda(lambda)
|
||||
|
||||
fun getResultingSubstitutor(): NewTypeSubstitutor {
|
||||
val storageSubstitutor = initialStorage.buildResultingSubstitutor(commonSystem, transformTypeVariablesToErrorTypes = false)
|
||||
|
||||
Reference in New Issue
Block a user