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:
+2
-2
@@ -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?>? */)
|
||||
|
||||
Reference in New Issue
Block a user