FIR: Lookup contained postponed atoms recursively in delegate inference
This commit is contained in:
committed by
teamcity
parent
26b158bded
commit
1a288fcdcd
+9
-2
@@ -195,8 +195,15 @@ class FirDelegatedPropertyInferenceSession(
|
|||||||
notCompletedCalls as List<FirStatement>,
|
notCompletedCalls as List<FirStatement>,
|
||||||
unitType, resolutionContext
|
unitType, resolutionContext
|
||||||
) { lambdaAtom ->
|
) { lambdaAtom ->
|
||||||
val containingCandidateForLambda = notCompletedCalls.first {
|
// Reversed here bc we want top-most call to avoid exponential visit
|
||||||
it.candidate.postponedAtoms.contains(lambdaAtom)
|
val containingCandidateForLambda = notCompletedCalls.asReversed().first {
|
||||||
|
var found = false
|
||||||
|
it.processAllContainingCallCandidates(processBlocks = true) { subCandidate ->
|
||||||
|
if (subCandidate.postponedAtoms.contains(lambdaAtom)) {
|
||||||
|
found = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
found
|
||||||
}.candidate
|
}.candidate
|
||||||
postponedArgumentsAnalyzer.analyze(
|
postponedArgumentsAnalyzer.analyze(
|
||||||
commonSystem.asPostponedArgumentsAnalyzerContext(),
|
commonSystem.asPostponedArgumentsAnalyzerContext(),
|
||||||
|
|||||||
Reference in New Issue
Block a user