FIR: Do not use return statement for type of a block expression

Type of a block is a kind of irrelevant for lambdas: their type is much
more complicated and defined via FirDataFlowAnalyzer#returnExpressionsOfAnonymousFunction
at at FirCallCompleter.LambdaAnalyzerImpl#analyzeAndGetLambdaReturnArguments
This commit is contained in:
Denis.Zharkov
2021-01-18 15:13:37 +03:00
parent 4dc2653736
commit b0b7f39c75
20 changed files with 127 additions and 83 deletions
@@ -7,7 +7,7 @@ FILE: lambdasReturns.kt
}
public final fun foo(x: R|kotlin/String?|): R|kotlin/Unit| {
lval r: R|kotlin/Int| = R|/myRun|<R|kotlin/Int|>(<L> = myRun@fun <anonymous>(): R|kotlin/Int| {
lval y: R|kotlin/String| = R|<local>/x| ?: ^@myRun R?C|/materialize|()
lval y: R|kotlin/String| = R|<local>/x| ?: ^@myRun R|/materialize|<R|kotlin/Int|>()
^ R|<local>/y|.R|kotlin/String.length|
}
)