[NI] Don't forget to analyze whole block for last postponed expression
This commit is contained in:
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
// !CHECK_TYPE
|
||||
|
||||
import kotlin.reflect.KFunction0
|
||||
|
||||
fun test() {
|
||||
val a = if (true) {
|
||||
val x = 1
|
||||
"".length
|
||||
::foo
|
||||
} else {
|
||||
::foo
|
||||
}
|
||||
a checkType { _<KFunction0<Int>>() }
|
||||
}
|
||||
|
||||
fun foo(): Int = 0
|
||||
Reference in New Issue
Block a user