5d0f004292
If one branch has Nothing type (contains 'return', etc.), return result type of corresponding resolved call (it may depend on smart casts) #KT-6242 Fixed
12 lines
254 B
Kotlin
Vendored
12 lines
254 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
|
|
|
inline fun<T> foo(block: () -> T):T = block()
|
|
|
|
fun baz() {
|
|
val x: String = foo {
|
|
val task: String? = null
|
|
if (task == null) {
|
|
return
|
|
} else <!DEBUG_INFO_SMARTCAST!>task<!>
|
|
}
|
|
} |