[FIR] Add NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY diagnostic
This commit is contained in:
committed by
teamcityserver
parent
151478aa27
commit
a6984c5198
+2
-2
@@ -14,10 +14,10 @@ fun bad(): String {
|
||||
val x: String? = null
|
||||
|
||||
x?.myRun { return "" }
|
||||
}
|
||||
<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
|
||||
fun ok(): String {
|
||||
val x: String? = null
|
||||
|
||||
x?.run { return "non-null" } ?: return "null"
|
||||
}
|
||||
<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
|
||||
Reference in New Issue
Block a user