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:
+1
-1
@@ -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|
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user