FE: don't run overload-by-lambda-return-type with unsuccessful candidates

Related to KT-52927
This commit is contained in:
Mikhail Glukhikh
2022-09-09 16:16:22 +02:00
committed by teamcity
parent 046f0ad95d
commit 393e99fa44
2 changed files with 4 additions and 2 deletions
@@ -95,6 +95,7 @@ class FirOverloadByLambdaReturnTypeResolver(
call: T,
candidates: Set<Candidate>,
): Set<Candidate>? where T : FirResolvable, T : FirStatement {
if (candidates.any { !it.isSuccessful }) return candidates
val lambdas = candidates.flatMap { candidate ->
candidate.postponedAtoms
.filter { it is ResolvedLambdaAtom && !it.analyzed }