Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/ifExprInWhenSubjectNonNull.kt
T
2015-12-11 15:17:37 +03:00

11 lines
282 B
Kotlin
Vendored

fun baz(s: String?, u: String?): String {
val t = when(if (u == null) return "" else <!DEBUG_INFO_SMARTCAST!>u<!>) {
"abc" -> u
"" -> {
if (s == null) return ""
s
}
else -> u
}
return <!DEBUG_INFO_SMARTCAST!>t<!>
}