Partial body resolve: don't be confused by exits after ?:

This commit is contained in:
Valentin Kipyatkov
2014-11-18 15:53:32 +03:00
parent e724af4b4e
commit f56d89c487
4 changed files with 33 additions and 0 deletions
@@ -0,0 +1,3 @@
Resolve target: val x: kotlin.Any?
Skipped statements:
if (x == null) { print(1) val v = f() ?: return }
@@ -0,0 +1,13 @@
fun foo() {
for (i in 1..10) {
val x = take()
if (x == null) {
print(1)
val v = f() ?: return
}
<caret>x.hashCode()
}
}
fun take(): Any? = null
fun f(): String? = null