[FE 1.0] Continue completion of calls inside that builder inference call postponed type variables of which has already been inferred

This commit is contained in:
Victor Petukhov
2022-05-07 22:44:52 +02:00
committed by teamcity
parent b8030ec1de
commit 7675361380
15 changed files with 64 additions and 50 deletions
@@ -193,7 +193,7 @@ class BuilderInferenceSession(
fun hasInapplicableCall(): Boolean = hasInapplicableCall
override fun writeOnlyStubs(callInfo: SingleCallResolutionResult): Boolean {
return !skipCall(callInfo)
return !skipCall(callInfo) && !arePostponedVariablesInferred()
}
private fun skipCall(callInfo: SingleCallResolutionResult): Boolean {
@@ -227,6 +227,8 @@ class BuilderInferenceSession(
fun getCurrentSubstitutor(): NewTypeSubstitutor =
commonSystem.buildCurrentSubstitutor().cast<NewTypeSubstitutor>().takeIf { !it.isEmpty } ?: EmptySubstitutor
private fun arePostponedVariablesInferred() = commonSystem.notFixedTypeVariables.isEmpty()
override fun initializeLambda(lambda: ResolvedLambdaAtom) {
this.lambda = lambda
}