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
@@ -6,14 +6,14 @@ fun test1(): J<String?> {
}
fun test2(): J<String?> {
return local fun <anonymous>(x: String): String {
return local fun <anonymous>(x: String): String? {
return x
}
/*-> J<String?> */
}
fun test3() {
return bar<String?>(j = local fun <anonymous>(x: String): String {
return bar<String?>(j = local fun <anonymous>(x: String): String? {
return x
}
/*-> J<X?>? */)