e97e792674
LoopTypeInfo became TypeInfoWithJumpInfo rewritten in Kotlin. Fixed a bug with break inside Elvis inside a loop, a pack of related tests added. isTrueConstant moved to JetPsiUtil.
9 lines
272 B
Kotlin
Vendored
9 lines
272 B
Kotlin
Vendored
public fun foo(x: String?, y: String?): Int {
|
|
while (true) {
|
|
x ?: if (y == null) break
|
|
// y is not null in both branches
|
|
<!DEBUG_INFO_SMARTCAST!>y<!>.length()
|
|
}
|
|
// y is null because of the break
|
|
return y<!UNSAFE_CALL!>.<!>length()
|
|
} |