[NI] Make behaviour of anonymous functions consistent with lambdas
Fix completion of anonymous functions with expression body without expected type. Premature completion led to losing type info from outer calls. Also report type mismatches on empty lambda expressions. KT-34729 In progress
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ fun test(a: (Int) -> Int) {
|
||||
}
|
||||
|
||||
fun test2(a: () -> List<Int>) {
|
||||
test2(fun () = <!NI;NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>listOf<!>())
|
||||
test2(fun () = <!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>listOf<!>())
|
||||
}
|
||||
|
||||
val a: (Int) -> Unit = fun(x) { checkSubtype<Int>(x) }
|
||||
|
||||
Reference in New Issue
Block a user