Don't suggest "return type is..." inspections for anonymous functions
#KT-29290 Fixed
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// WITH_RUNTIME
|
||||
// PROBLEM: none
|
||||
package kotlinx.coroutines
|
||||
|
||||
suspend fun barAsync(): Deferred<String>? {
|
||||
return null
|
||||
}
|
||||
|
||||
suspend fun foo() {
|
||||
" ".let <caret>{ barAsync() }
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// PROBLEM: none
|
||||
package kotlin
|
||||
|
||||
fun test() {
|
||||
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
package kotlin
|
||||
|
||||
fun test() {
|
||||
val x = fun() = Result("123").getOrThrow()
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// PROBLEM: none
|
||||
package kotlin
|
||||
|
||||
fun test() {
|
||||
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
package kotlin
|
||||
|
||||
fun test() {
|
||||
val x = { Result(true).getOrThrow() }
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// PROBLEM: none
|
||||
package kotlin
|
||||
|
||||
fun test(arg: Boolean) {
|
||||
|
||||
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
package kotlin
|
||||
|
||||
fun test(arg: Boolean) {
|
||||
val x = foo@{
|
||||
(if (!arg) {
|
||||
return@foo Result(true).getOrThrow()
|
||||
} else {
|
||||
Result(false)
|
||||
}).getOrThrow()
|
||||
}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// PROBLEM: none
|
||||
package kotlin
|
||||
|
||||
fun test() {
|
||||
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
package kotlin
|
||||
|
||||
fun test() {
|
||||
val x = foo@<caret>{ return@foo Result(true).getOrThrow() }
|
||||
}
|
||||
Reference in New Issue
Block a user