NI: Get rid of redundant asPostponedArgumentsAnalyzerContext calls
This commit is contained in:
+3
-3
@@ -13,12 +13,12 @@ import org.jetbrains.kotlin.fir.resolve.calls.FirNamedReferenceWithCandidate
|
||||
import org.jetbrains.kotlin.fir.resolve.inference.FirCallCompleter
|
||||
import org.jetbrains.kotlin.fir.resolve.inference.FirInferenceSession
|
||||
import org.jetbrains.kotlin.fir.resolve.inference.ResolvedLambdaAtom
|
||||
import org.jetbrains.kotlin.fir.types.isBuiltinFunctionalType
|
||||
import org.jetbrains.kotlin.fir.resolve.initialTypeOfCandidate
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor
|
||||
import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirAbstractBodyResolveTransformer
|
||||
import org.jetbrains.kotlin.fir.types.classId
|
||||
import org.jetbrains.kotlin.fir.types.coneType
|
||||
import org.jetbrains.kotlin.fir.types.isBuiltinFunctionalType
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemCompletionMode
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION_CLASS_ID
|
||||
import org.jetbrains.kotlin.utils.addToStdlib.same
|
||||
@@ -135,7 +135,7 @@ class FirOverloadByLambdaReturnTypeResolver(
|
||||
|
||||
call.replaceCalleeReference(FirNamedReferenceWithCandidate(null, firstCandidate.callInfo.name, firstCandidate))
|
||||
val results = postponedArgumentsAnalyzer.analyzeLambda(
|
||||
firstCandidate.system.asPostponedArgumentsAnalyzerContext(),
|
||||
firstCandidate.system,
|
||||
firstAtom,
|
||||
firstCandidate,
|
||||
ConstraintSystemCompletionMode.FULL,
|
||||
@@ -144,7 +144,7 @@ class FirOverloadByLambdaReturnTypeResolver(
|
||||
val (candidate, atom) = iterator.next()
|
||||
call.replaceCalleeReference(FirNamedReferenceWithCandidate(null, candidate.callInfo.name, candidate))
|
||||
postponedArgumentsAnalyzer.applyResultsOfAnalyzedLambdaToCandidateSystem(
|
||||
candidate.system.asPostponedArgumentsAnalyzerContext(),
|
||||
candidate.system,
|
||||
atom,
|
||||
candidate,
|
||||
results,
|
||||
|
||||
+1
-1
@@ -181,7 +181,7 @@ class FirCallCompleter(
|
||||
initialType,
|
||||
transformer.resolutionContext
|
||||
) {
|
||||
analyzer.analyze(candidate.system.asPostponedArgumentsAnalyzerContext(), it, candidate, completionMode)
|
||||
analyzer.analyze(candidate.system, it, candidate, completionMode)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-3
@@ -18,7 +18,10 @@ import org.jetbrains.kotlin.resolve.calls.inference.NewConstraintSystem
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.buildAbstractResultingSubstitutor
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemCompletionContext
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemCompletionMode
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.*
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.BuilderInferencePosition
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintKind
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.NewConstraintSystemImpl
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.registerTypeVariableIfNotPresent
|
||||
import org.jetbrains.kotlin.types.model.*
|
||||
|
||||
@@ -204,7 +207,7 @@ class FirDelegatedPropertyInferenceSession(
|
||||
found
|
||||
}.candidate
|
||||
postponedArgumentsAnalyzer.analyze(
|
||||
commonSystem.asPostponedArgumentsAnalyzerContext(),
|
||||
commonSystem,
|
||||
lambdaAtom,
|
||||
containingCandidateForLambda,
|
||||
ConstraintSystemCompletionMode.FULL,
|
||||
@@ -321,4 +324,4 @@ class FirDelegatedPropertyInferenceSession(
|
||||
|
||||
return introducedConstraint
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user