Report CANNOT_INFER_PARAMETER_TYPE on any error value parameters of a lambda

^KT-48058 Fixed
This commit is contained in:
Victor Petukhov
2021-08-06 10:13:54 +03:00
committed by teamcityserver
parent 1966915e92
commit cd09c8ba51
14 changed files with 97 additions and 10 deletions
@@ -0,0 +1,23 @@
fun test1() {
try {
{ toDouble ->
}
} catch (e: Exception) {
}
}
fun test2() {
try {
} catch (e: Exception) {
{ toDouble ->
}
}
}
fun box(): String {
test1()
test2()
return "OK"
}
@@ -0,0 +1,23 @@
fun test1() {
try {
{ <!CANNOT_INFER_PARAMETER_TYPE!>toDouble<!> ->
}
} catch (e: Exception) {
}
}
fun test2() {
try {
} catch (e: Exception) {
{ <!CANNOT_INFER_PARAMETER_TYPE!>toDouble<!> ->
}
}
}
fun box(): String {
test1()
test2()
return "OK"
}
@@ -0,0 +1,5 @@
package
public fun box(): kotlin.String
public fun test1(): kotlin.Unit
public fun test2(): kotlin.Unit