KT-3273 Return type coalesces to Tuple0 in when/if nested clauses

#KT-3273 Fixed
This commit is contained in:
Nikolay Krasko
2013-01-23 19:23:27 +04:00
parent 3e02764603
commit 2e27fb80f3
2 changed files with 22 additions and 0 deletions
@@ -0,0 +1,17 @@
public fun testCoalesce() {
val value: String = when {
true -> {
if (true) {
"foo"
} else {
"bar"
}
}
else -> "Hello world"
}
}
fun box(): String {
testCoalesce()
return "OK"
}